I legally defaced this website.

442,009
0
Published 2023-09-05
#pentesting #ctf #hacking #cybersecurity

00:00 - intro
00:33 - Disclaimer
00:43 - Mapping the website
02:15 - Directory listing
04:03 - Hidden portal
05:42 - Bruteforce
06:04 - More enumeration
06:53 - FTP access
07:12 - SSH hacking
08:22 - Another website
09:16 - Interesting file
10:59 - Read arbitrary files
14:11 - More enumeration
14:52 - Backup file with htpassword hash
15:17 - Cracked the hash
16:19 - File upload
22:50 - Remote Code Execution
24:17 - Privilege escalation
25:25 - Website defaced

DISCLAIMER: The techniques shown here should strictly be used on targets you HAVE permission to test. NEVER hack something you don't have permission to.

In this video, I demonstrate how to hack a CTF target, get root, and deface it in just a few minutes. Web developers will learn a lot on how to secure their websites! Ethical hackers will learn hacking techniques to help their clients become more secure.

Credit: Challenge ch4inrulz: 1.0.1 from @mohammadaskar2

šŸ”„Use Coupon THEHACKERISH and Get 5% discount on CRTP and other courses on www.alteredsecurity.com/ when you pay with Stripe.

šŸš€ šŸ”„ Become a pentester
academy.thehackerish.com/p/from-zero-to-signing-yoā€¦

šŸ“™ Learn the technical skills:
thehackerish.com/best-hacking-websites-for-ethicalā€¦

šŸ“™ Become a successful bug bounty hunter: thehackerish.com/a-bug-bounty-hunting-journey-book

šŸ†“ Download your FREE Web hacking LAB and starting hacking NOW: thehackerish.com/owasp-top-10-lab-vm-free

šŸŒ Read more on the blog: thehackerish.com/

šŸ‡© Discord: discord.gg/2ykmr2ynpf

šŸ’ŖšŸ» Support this work: thehackerish.com/how-to-support

- Facebook Page: www.facebook.com/thehackerish

- Follow us on Twitter: twitter.com/thehackerish

- Listen on Anchor: anchor.fm/thehackerish

- Listen on Spotify: open.spotify.com/show/4Ht8jEbPzyZnfbIlhFG91x

- Listen on Google Podcasts: podcasts.google.com/?feed=aHR0cHM6Ly9hbmNob3IuZm0vā€¦

All Comments (21)
  • @Simone-uu8ne
    As someone who works in the reliability engineering team of a medium-sized corp, this is literally one of my worst nightmares. People don't realise how easy it is to create vulnerabilities in bigger projects.
  • As a Junior offensive cybersec student this was so informational. I loved the methodical method you explained and really liked to watch the whole process. I always struggle to find good methodical aproches from where to start and how to deal with roadblocks when trying to sort things out. Hope to see more of this on your channel <3
  • @Gmarkooo
    Ur Channel is underrated. Please dont stop posting, I know your channel will blow up one day.
  • @Zuzyk
    Another solution instead of the file api could be to name the file ā€0.php%00%.jpegā€. The check might be looking for the filename to end with .jpeg but in some versions of php when php writes the file to disk it looks for the first null character in the filename to know when itā€™s ā€œdoneā€. That way ā€œ0.php%00%.jpegā€ becomes ā€œ0.phpā€
  • @tbuk8350
    If you would want to secure that, an API shouldn't take a file as an input, you should store any user-uploaded files with an ID that you store in a database and have the API reference that ID to find the file. That's already the whole "access any file on the system" issue fixed. Then, you should make sure that the API is the only thing that can access those user-uploaded files, and you should make sure the code behind your API treats the data as a string and doesn't execute it. It is also generally good practice to have every admin page locked with a secure, hashed password, and if you want to go above and beyond the server should only take requests from your private key, any incorrectly encrypted requests should be ignored as they didn't come from your key.
  • @LaughWithLevi
    Canā€™t wait to use this knowledge for ā€œprotecting my websiteā€
  • @qwoolrat
    to think all of this can be mostly protected by ratelimiting the user and not letting them send thousands of requests in a few minutes
  • @Cornell_
    As someone who's currently developping a pretty big web app these videos always scare the shit outta me man ! I am pretty confident that I'm able to produce "safe" code but, the fear's always present. Love the content tho <3
  • @TechAmbition
    Man this was straight Information, No Stupid Intro, No Freaking, Direct Knowledgeā¤
  • @scary34
    Your channel is so underrated , LOVE IT
  • @larry1851
    The File API should have been configured to only give access to specific folders. For the upload API you could search for code symbols etc. Also a cooldown for login attempts would slow down such bruteforce attacks. But this was a very good and informational video. Also a follow up video where you would go into detail on how to prevent such exploitation would be great.
  • @kipchickensout
    It's so nice to watch, especially when I know most of the stuff you used or did, but would've never thought about using it :)
  • @KangJangkrik
    "Be a developer first, before being a hacker" ā€” my mentor
  • @azimulhasan4391
    amazing content , gives a lot of insights on exactly whats going on in the websites
  • @mrobvious6112
    Haha, it is like some real world CTF I use to do, and some steps where similar... man, this kind of stuff is what I like to watch so I can memorize it again, and not forget about it.
  • @yima7
    i started studying cyber sec a couple months ago and your channel is a gem, really keeps me motivated as a see the things i'm learning being applied and it helps a lot with piecing together an image. Thanks a lot for sharing this :)
  • @willhearn9191
    You had access to an anonymous FTP server. I believe you could have uploaded a PHP backdoor and used the LFI to include the script.
  • @papatumhare5947
    What i understand is this is not simple you have lots of knowledge and better understanding what are you doing with files and how you read error increadible salute sirā¤
  • @mx338
    Especially of you're a developer, you should just use static site generation or write a HTML site from scratch, for a simple site like this. Static HTML allows for no attack surface and even a default config web server on an up to date, reasonably secured Linux system, should provide practically no attack surface.
  • @It_is_adrenalin
    well, underrated AF, keep it going man! Apreciating your content