Balaji Anbalagan
2 min readFeb 12, 2022

--

100 Days of Hacking — Day 8

Objectives of day 8:

  1. Learn about CSP bypassing vulnerability
  2. Finish a tryhackme room

Reports of day 8:

Okay first of all I found this gold mine :

https://oscpnotes.infosecsanyam.in/My_OSCP_Preparation_Notes.html

It’s very detailed with some lab experiences do give it a read if you are seriously preparing for OSCP.

The tryhackme room I tried was https://tryhackme.com/room/cowboyhacker

I didn’t get the anime reference :( sed noises anyways standard enumerations and

Nice story line

It was easy to get the user.txt now to the privilege escalation part as we can see our user can run /bin/tar command so I searched payloads that leverage this.

This payload is brilliant (obviously) ahem, as far as I know, the -c creates an archive file in /dev/null named as /dev/null whenever the -checkpoint=1 is reached checkpoint-actions will look for any possible action to execute in this case its the access to bash binary /bin/sh.

Read this for a better understanding :

https://blog.gregscharf.com/2021/03/22/tar-in-cronjob-to-privilege-escalation/

and kapow

Now, I learned about content security policy by playing this: http://csp1.rf.gd/bypass-1.php

It shows how whitelisting insecure CDN plugins will lead to XSS. (ajax.googleapi.com is one of them).

sbin/shutdown(day8)

--

--

Balaji Anbalagan

Newb CTF player. <img src=x onerr…./> oops yea im a newb bug bounty hunter too :) hehe (c wat i did there)