Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-24-2013, 08:35 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Hacking › Exploit v
« Previous 1 2 3 4 5 ... 15 Next »

belajar bareng local exploit

Home General Computer Multimedia Business Lounge

Pages (2): 1 2 Next »
Post Reply 
Tweet
Threaded Mode | Linear Mode
belajar bareng local exploit
04-13-2012, 10:28 PM
Post: #1
alessandra Offline
i'm so lonely broken angel
Posts: 196
Joined: Feb 2012
Reputation: 41
belajar bareng local exploit
baik,di sini kita akan mempelajari bagaimana local exploit
bekerja untuk mendapatkan akses root di linux dengan cara sebagai berikut :
mendapatkan inode(index node)/object id di shell
dengan cara compile shell,untuk getdents(),setdummy xattr,
untuk di jadikan satu dengan getdents()
nah di sini dia akan nulis lagi CAP_SETUID di xattr,
hingga eksekusi shell then..got root!

exploitnya seperti ini
http://jon.oberheide.org/files/team-edward.py
untuk kernel 2.6.34-rc3 yang memiliki bug privilege escalation

bagaimanakah bug tersebut bisa terjadi dan
seperti apa sih pola/konsep eksploitasi terhadap
mesin bekerja??
ini berhubung alessa masih baru belajar ya,jadi kalau ada salah
mohon ngemis jangan di ketawain,kl bisa di bantu please

step by step eksploitasinya kurang-lebih seperti ini :


1.manggil mmap untuk jadi map zero page
apa itu mmap dan map zero page?

mmap adalah POSIX-compliant nya di unix syscall
tugasnya yang memetakan file atau perangkat ke dalam memori.
selanjutnya dia ini mengimplementasikan permintaaan halaman
karena pada awalnya isi file gk bisa di baca dari disk
tanpa memori fisik sekalipun,
sederhananya,mmap dapat membuat beberapa jenis pemetaan dari memori tsb.
di sini maksudnya pemetaan secara virtual yang sama dengan malloc untuk implementasi dari alokasi memori tertentu
jadi file ini akan di dukung pemetaan area memori virtual untuk proses selanjutnya,yang akan mengalokasikan memori

2.merubah fake mbuf di 0x0
contoh :
mbuf> data yang akan di ponting ke address
yang masuk ke table syscall

3.memangil getsockopt untuk mentrigger vulnerabilitiesnya

getsockopt() ini ibaratnya kayak asistennya kernel
yang tugasnya identifier paket yg akan masuk ke kernel
jadi dia akan memeriksa apakah yg akan di kirim ke kernel ini
ipv4 atau ipv6
nah karena tugasnya getsockopt ini banyak
dia masih ada lagi yang ngebantuin tugasnya yaitu si 'packet.h'
(skip di sini tidak akan membahas lebih lanjut tentang packet.h biar gk meluber)
yang akan memvalidasi ipv4 atau SCTP yang valid
untuk menghindari stack di mem nya fully loaded bahkan hingga crash --"

4.membuat fake akses untuk kernel dengan fungsi mbuf
yang akan di alocated ke 0x0 dan menjadikan 0x1 ke address mbuf->data
dengan meng-overwrite di syscall nya

5.set up root buat jalanin shellcode
di address 0x1

6.memanggil syscall untuk di overwrite

7.dengan memanggil system yang vulner di 0x1
(dalam hal ini null pointer dereference)
untuk eksekusi shellcode/exploit di sini

biasanya di /proc/sys/vm/mmap_min_addr
ini gak bisa mmaping untuk addres < mmap_min_addr
karena dia ngeblock null ptr derefs yang leak sensitive kernel memory untuk userspace
biasanya sih karena di batasi oleh copy_to_user()

info leak w/setuid exploit
leak dari task_struct/vma untuk bypass ASLR
untuk mencari nilai canaries dari task_struct

contoh codenya :
Code:
static int sctp_getsockopt_hmac_ident(struct sock *sk, int len, char __user *optval, int __user *optlen)
{
   struct sctp_hmac_algo_param *hmacs;
   __ul6 param_len;
[b](di len ini lah attacker mengeksploitasinya)[/b]

   hmacs = sctp_sk(sk)->ep->auth_hmacs_list;
   param_len = ntohs(hmacs->param_hdr.length);

   if (len < param_len)
       return -EINVAL;
   if (put_user(len, optlen))
       return -EFAULT;
   if (copy_to_user(optval, hmacs->hmac_ids, len))
       return -EFAULT;
[b]unbounded copy_to_user[/b]
   return 0;
}
menggunakan ptrace_attach untuk user copies
contoh menggunakan sendmsg() untuk multiple user copy yang vulner

contoh race_condition.c
Code:
while(ucmsg != NULL)
{
    if(get_user(ucmlen, &ucmsg->cmsg_len))
        return -EFAULT;
    if(CMSG_COMPAT_ALIGN(ucmlen) < CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr)))
        return -EINVAL;
    if((unsigned long) (((char __user *)ucmsg - (char __user *)kmsg->msg_control)  + ucmlen) > kmsg->msg_controllen)
        return -EINVAL;
    tmp = ((ucmlen - CMSG_COMPAT_ALIGN(sizeof(*ucmsg))) +
        CMSG_ALIGN(sizeof(struct cmsghdr)));
    kcmlen += tmp;
    ucmsg = cmsg_compat_nxthdr(kmsg, ucmsg, ucmlen);
}

    if(kcmlen > stackbuf_size)
        kcmsg_base = kcmsg = kmalloc(kcmlen, GFP_KERNEL);

    while(ucmsg != NULL)
{
    __get_user(ucmlen, &ucmsg->cmsg_len);
    tmp = ((ucmlen - CMSG_COMPAT_ALIGN(sizeof(*ucmsg))) + CMSG_ALIGN(sizeof(struct cmsghdr)));
    kcmsg->cmsg_len = tmp;
    __get_user(kcmsg->cmsg_level, &ucmsg->cmsg_level);
    __get_user(kcmsg->cmsg_type, &ucmsg-<cmsg_type);

    if(copy_from_user(CMSG_DATA(kcmsg), CMSG_COMPAT_DATA(ucmsg),
yeepp gw jelasin maksud dari kode di atas
Quote:if(get_user(ucmlen, &ucmsg->cmsg_len))
return -EFAULT;
dia akan mengkopi semua nilai sepanjang yang ada di userspace
dengan mensanitasi nilai panjang yang di check terlebih dahulu di
Quote:(char __user *)kmsg->msg_control) + ucmlen) > kmsg->msg_controllen)
slab sebagai allocator default di kernel yang tugasnya kerja sama dengan kmalloc()

yeppp kita sudah cukup tahu bugnya
dan sekarang kita akan pelajari source code xplnya
yang memanfaatkan kesalahan klasifikasi null pointer dereferences
yang sebenarnya dia hanya menspesifikasikan case di 0x0

mensetup payload untuk mmap kemudian
menjadikan nilai memcpy null dengan shellcode seperti ini:
Quote:XATTR = '\x41\x58\x46\x52\xc1\x00\x00\x02\x01\x00\x00\x02\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
(0,shellcode,sizeof(shellcode));

dengan mentrigger bug null derefercens
untuk mengirim file di (__get_user,CMSG_COMPAT_ALIGN,);
tinggal mengisi space untuk kemudian trigger functionnya
root!!!

[Image: unyu.png]

full copas from :
http://aleesandra-amour.blogspot.com/201...ploit.html
referensi :
http://phrack.org/issues.html?issue=66&id=15#article
Find all posts by this user
Quote this message in a reply
 Reputed by :  kidofdream(+1) , Reborn Of Code(+1) , DnA19(+1) , ditatompel(+1) , KataM(+1) , Motaro Irhaby(+1) , rusuh(+1) , ubuntux(+1)
04-13-2012, 10:31 PM
Post: #2
civo Offline
./Panah Nanggala\.
**
Moderators
Posts: 2,089
Joined: Jan 2011
Reputation: 65
RE: belajar bareng local exploit
ijin belajar mbakyu belajar...
walaupun lumayan pusing juga sih...
smangat dan ijin ane arsipin buat tambahan bank data ane yaa mbakyu genit
Find all posts by this user
Quote this message in a reply
04-13-2012, 10:33 PM
Post: #3
Reborn Of Code Offline
[+] Devilz Bl4ckeyes [+]
Posts: 139
Joined: Feb 2012
Reputation: 19
RE: belajar bareng local exploit
wew
sadis tutorial nya
ijin belajar ya kak
please
Find all posts by this user
Quote this message in a reply
04-13-2012, 10:34 PM (This post was last modified: 04-13-2012 10:38 PM by alessandra.)
Post: #4
alessandra Offline
i'm so lonely broken angel
Posts: 196
Joined: Feb 2012
Reputation: 41
RE: belajar bareng local exploit
(04-13-2012 10:31 PM)civo Wrote:  ijin belajar mbakyu belajar...
walaupun lumayan pusing juga sih...
smangat dan ijin ane arsipin buat tambahan bank data ane yaa mbakyu genit

silahkan :| saya juga belajar kok pak civo
anyway ngga pake emot genit kenapa sih nohope
nggak unyu banget gituuuuh ngambek
(04-13-2012 10:33 PM)Reborn Of Code Wrote:  wew
sadis tutorial nya
ijin belajar ya kak
please

gw juga belajar bang,bareng-bareng ya hore
Find all posts by this user
Quote this message in a reply
04-13-2012, 10:39 PM
Post: #5
civo Offline
./Panah Nanggala\.
**
Moderators
Posts: 2,089
Joined: Jan 2011
Reputation: 65
RE: belajar bareng local exploit
(04-13-2012 10:34 PM)alessandra Wrote:  
(04-13-2012 10:31 PM)civo Wrote:  ijin belajar mbakyu belajar...
walaupun lumayan pusing juga sih...
smangat dan ijin ane arsipin buat tambahan bank data ane yaa mbakyu genit

silahkan :| saya juga belajar kok pak civo
anyway ngga pake emot genit kenapa sih nohope
nggak unyu banget gituuuuh ngambek

ga boleh pake emo genit <<-- ini yaa mbakyu mohon maaf...
hmm..tapi setahu ane yang ga demen ma itu emot tuh...dia...dia...dia....tersipu
Find all posts by this user
Quote this message in a reply
04-13-2012, 10:41 PM
Post: #6
alessandra Offline
i'm so lonely broken angel
Posts: 196
Joined: Feb 2012
Reputation: 41
RE: belajar bareng local exploit
oooh nggak apa-apa kok pakai aja piss heuhuehue
Find all posts by this user
Quote this message in a reply
04-13-2012, 10:51 PM
Post: #7
KotoM Offline
Covergay Dewa
Posts: 563
Joined: May 2011
Reputation: 58
RE: belajar bareng local exploit
wkkwkw mantap omz
mantap
walau rada2 bingung
Find all posts by this user
Quote this message in a reply
04-13-2012, 10:59 PM
Post: #8
STr4sh Away
./Devilz Commander
Posts: 310
Joined: Aug 2011
Reputation: 4
RE: belajar bareng local exploit
exploit oh exploit susah amat memahamimu...

thnks tutornya mbak alessa. mantap
Visit this user's website Find all posts by this user
Quote this message in a reply
04-13-2012, 11:06 PM
Post: #9
DnA19 Away
Devilz e-Magazine Team (DeMT)
*****
DeMT Team
Posts: 446
Joined: Sep 2011
Reputation: 76
RE: belajar bareng local exploit
smangat
mantap
izin belajar dulu ya 0mz...
ngacir
Find all posts by this user
Quote this message in a reply
04-13-2012, 11:34 PM
Post: #10
solihan67 Offline
./Devilz 1st Cadet
Posts: 10
Joined: Apr 2012
Reputation: 0
RE: belajar bareng local exploit
local exploit itu apa mbakyu? apakah yg dimaksdu local explot itu , ngeroot jaringan LAN lokal ? wow
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Tutor] WordPress Exploit (easy-comment-uploads/upload-form.php) XPByte 16 1,043 05-19-2013 05:40 PM
Last Post: oe_c0x
Bug [Tutor] Facebook session Exploit Priv8 abuabu_hat10 20 397 05-19-2013 05:36 PM
Last Post: oe_c0x
  MinaliC Webserver 2.0.0 HTTP Post Exploit cr0security 8 140 04-23-2013 09:07 AM
Last Post: darkmessage
  DOS ip pada local area dengan ettercap dxfandy19 11 162 04-21-2013 02:19 PM
Last Post: ghosthands
  [Tutor] Exploit windows dengan add on dan dns spoof RieqyNS13 17 336 02-10-2013 08:35 PM
Last Post: cangcimen
Thumbs Up [Tutor] POC + Exploit Wordpress ~ Video Blogging Arbitrary File Upload Regel 11 673 02-02-2013 12:19 AM
Last Post: copaker21
  Butuh Local Exploit Kernel Server AnonymousOpsID 2 164 11-24-2012 08:37 PM
Last Post: AnonymousOpsID
  #DiyWeb Admin Bypass dan Remote file/shell Upload exploit AnonymousOpsID 4 337 11-06-2012 05:07 PM
Last Post: rock_me
Rainbow Kumpulan exploit dan 3000++ tool hacking dvildance 3 344 10-31-2012 10:23 PM
Last Post: jibril
  [Ask] [metasploit] gagal exploit ke komputer target via LAN w0rmil_alazka 10 189 10-29-2012 10:46 AM
Last Post: p0pc0rn

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-24-2013, 08:35 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE