{"id":131,"date":"2023-06-10T20:21:11","date_gmt":"2023-06-10T20:21:11","guid":{"rendered":"https:\/\/justatrainingblog.co.uk\/?p=131"},"modified":"2023-06-10T20:22:38","modified_gmt":"2023-06-10T20:22:38","slug":"thm-exploiting-ftp","status":"publish","type":"post","link":"https:\/\/justatrainingblog.co.uk\/?p=131","title":{"rendered":"THM &#8211; Exploiting FTP"},"content":{"rendered":"\n<p>As part of learning about Telnet in TryHackMe we practiced some methods in which FTP can be exploited. I have detailed one of the methods taken to do so here and how it was done. <\/p>\n\n\n\n<p>Scanning Phase<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"920\" height=\"366\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/Nmap-scan.png\" alt=\"\" class=\"wp-image-132\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/Nmap-scan.png 920w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/Nmap-scan-300x119.png 300w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/Nmap-scan-768x306.png 768w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/Nmap-scan-850x338.png 850w\" sizes=\"(max-width: 920px) 100vw, 920px\" \/><\/figure>\n\n\n\n<p>To start with we ran a Nmap scan to see what open ports we had. &#8211;min-rate is used to speed up the attempt and -p- is used to find all open ports. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">Exploiting Anonymous Login <\/span><\/p>\n\n\n\n<p>We have checked for an anonymous login account and managed to sign in using the details:<\/p>\n\n\n\n<p>Username: Anonymous<\/p>\n\n\n\n<p>Password: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"595\" height=\"303\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/FTP-Login-Anonymous-1.png\" alt=\"\" class=\"wp-image-134\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/FTP-Login-Anonymous-1.png 595w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/FTP-Login-Anonymous-1-300x153.png 300w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><\/figure>\n\n\n\n<p><span style=\"text-decoration: underline;\">Finding Details<\/span><\/p>\n\n\n\n<p>So after running ls we can see a text file named PUBLIC_NOTICE.txt. Lets take a look. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"924\" height=\"308\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/File-Transfer1-1.png\" alt=\"\" class=\"wp-image-136\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/File-Transfer1-1.png 924w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/File-Transfer1-1-300x100.png 300w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/File-Transfer1-1-768x256.png 768w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/File-Transfer1-1-850x283.png 850w\" sizes=\"(max-width: 924px) 100vw, 924px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"532\" height=\"562\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image.png\" alt=\"\" class=\"wp-image-137\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image.png 532w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image-284x300.png 284w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image-300x317.png 300w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><\/figure>\n\n\n\n<p>Okay so not a lot of information but we can see that &#8216;Mike&#8217; set this public notice making it a possible username. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">Enumerating the password<\/span><\/p>\n\n\n\n<p>Time to switch gears. This time we&#8217;ll use Hydra to attempt to brute-force the password. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"952\" height=\"502\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image-1.png\" alt=\"\" class=\"wp-image-138\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image-1.png 952w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image-1-300x158.png 300w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image-1-768x405.png 768w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image-1-850x448.png 850w\" sizes=\"(max-width: 952px) 100vw, 952px\" \/><\/figure>\n\n\n\n<p>Success! We have a password of, well &#8216;password&#8217;. We can now sign in using the FTP login details. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"565\" height=\"214\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image-2.png\" alt=\"\" class=\"wp-image-139\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image-2.png 565w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2023\/06\/image-2-300x114.png 300w\" sizes=\"(max-width: 565px) 100vw, 565px\" \/><\/figure>\n\n\n\n<p>Obviously this is a simplistic and basic example of how poor misconfiguration can leave a system vulnerable, however this is something still worth knowing and practicing and really highlights the dangers of both using an insecure protoclol and the danger of poor security practices!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As part of learning about Telnet in TryHackMe we practiced some methods in which FTP can be exploited. I have&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[2,3],"tags":[],"class_list":["post-131","post","type-post","status-publish","format-standard","hentry","category-learning","category-tryhackme"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=131"}],"version-history":[{"count":1,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/131\/revisions"}],"predecessor-version":[{"id":140,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/131\/revisions\/140"}],"wp:attachment":[{"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}