|
| 1 | +# Intro PoC Scripting |
| 2 | + |
| 3 | +- Please read the introduction description |
| 4 | + |
| 5 | + no answer needed |
| 6 | + |
| 7 | +- What is the target's platform and version number? |
| 8 | + |
| 9 | + - `webmin 1.580` |
| 10 | + |
| 11 | +- What is the associated CVE for this platform? |
| 12 | + |
| 13 | + - `CVE-2012-2982` |
| 14 | + |
| 15 | +- Which file does the vulnerability exist in? |
| 16 | + |
| 17 | + - `file/show.cgi` |
| 18 | + |
| 19 | +- What program/command would be the most effective to use in this exploit? |
| 20 | + |
| 21 | + - `system shell` |
| 22 | + |
| 23 | +- What's the original disclosure date of this exploit? |
| 24 | + |
| 25 | + - `September 6 2012`, It's written in the POC. |
| 26 | + |
| 27 | + |
| 28 | +- What HTTP response code do we expect after the initial POST request? |
| 29 | + |
| 30 | + - `302` |
| 31 | + |
| 32 | +- What does sid stand for and what is it's purpose? |
| 33 | + |
| 34 | + - `Session ID, authentication` |
| 35 | + |
| 36 | +- In the check function, what is it doing to the cookies? |
| 37 | + |
| 38 | + - `format` |
| 39 | + |
| 40 | +- In the second request of the check function, what method is piped into the command? |
| 41 | + |
| 42 | + - `rand_text_alphanumeric` |
| 43 | + |
| 44 | +- Which HTTP response header allows us to send an authenticated POST request? |
| 45 | + |
| 46 | + - `Set-Cookie` |
| 47 | + |
| 48 | +- Which is the correct method for formatting cookies in this example? |
| 49 | + |
| 50 | + - `any` |
| 51 | + |
| 52 | +- What data type does the payload need to be? |
| 53 | + |
| 54 | + - `string` |
| 55 | + |
| 56 | +- Why do we need to use "bash -c exec" instead of just "bash -i" |
| 57 | + |
| 58 | + - `replaces current shell process` |
| 59 | + |
| 60 | +- What is the purpose of "<&1" in the payload function? |
| 61 | + |
| 62 | + - `redirects socket output stream to bash input stream` |
| 63 | + |
| 64 | +- Run the program and listen for the shell. What is the /root/root.txt flag? |
| 65 | + |
| 66 | + - `wget https://raw.githubusercontent.com/cd6629/CVE-2012-2982-Python-PoC/master/web.py` |
| 67 | + - Change the IP address inside the file with yours. |
| 68 | + - Listen for a shell with `sudo nc -lnvp 53` |
| 69 | + - `python3 web.py <TARGET_IP>` |
| 70 | + - On the new shell `cat /root/root.txt` |
| 71 | + - `THM{****************}` |
| 72 | + |
| 73 | +- No questions here |
| 74 | + |
| 75 | + no answer needed |
| 76 | + |
| 77 | +- Check out some of those links for more reading material. |
| 78 | + |
| 79 | + no answer needed |
| 80 | + |
| 81 | + |
| 82 | + |
0 commit comments