Kecoak Elektronik Indonesia

November 20, 2008

Metasploit 3.2 is released

Filed under: News — staff @ 10:34 pm

888                           888        d8b888
888                           888        Y8P888
888                           888           888
88888b.d88b.  .d88b. 888888 8888b. .d8888b 88888b. 888 .d88b. 888888888
888 “888 “88bd8P  Y8b888       “88b88K     888 “88b888d88″”88b888888
888  888  88888888888888   .d888888″Y8888b.888  888888888  888888888
888  888  888Y8b.    Y88b. 888  888     X88888 d88P888Y88..88P888Y88b.
888  888  888 “Y8888  ”Y888″Y888888 88888P’88888P” 888 “Y88P” 888 “Y888
888
888
888

Contact: H D Moore                              FOR IMMEDIATE RELEASE
Email: hdm[at]metasploit.com

Austin, Texas, November 19th, 2008 — The Metasploit Project
announced today the free, world-wide availability of version 3.2 of
their exploit development and attack framework. The latest version
is provided under a true open source software license (BSD) and is
backed by a community-based development team.

Metasploit runs on all modern operating systems, including Linux,
Windows, Mac OS X, and most flavors of BSD. Metasploit has been used
on a wide range of hardware platforms, from massive Unix mainframes to
the iPhone. Users can access Metasploit using the tab-completing console
interface, the Gtk GUI, the command line scripting interface, or the
AJAX-enabled web interface. The Windows version of Metasploit includes
all software dependencies and a selection of useful networking tools.

The latest version of the Metasploit Framework, as well as screen
shots, video demonstrations, documentation and installation
instructions for many platforms, can be found online at

- http://metasploit.com/framework/

This release includes a significant number of new features and
capabilities, many of which are highlighted below.

Version 3.2 includes exploit modules for recent Microsoft flaws, such
as MS08-041, MS08-053, MS08-059, MS08-067, MS08-068, and many more.

The module format has been changed in version 3.2. The new format
removes the previous naming and location restrictions and paved the way
to an improved module loading and caching backend. For users, this means
being able to copy a module into nearly any subdirectory and be able to
immediately use it without edits.

The Byakugan WinDBG extension developed by Pusscat has been integrated
with this release, enabling exploit developers to quickly exploit new
vulnerabilities using the best Win32 debugger available today.

The Context-Map payload encoding system development by I)ruid is now
enabled in this release, allowing for any chunk of known process memory to
be used as an encoding key for Windows payloads.

The Incognito token manipulation toolkit, written by Luke Jennings, has
been integrated as a Meterpreter module. This allows an attacker to gain
new privleges through token hopping. The most common use is to hijack
domain admin credentials once remote system access is obtained.

The PcapRub, Scruby, and Packetfu libraries have all been linked into
the Metasploit source tree, allowing easy packet injection and capture.

The METASM pure-Ruby assembler, written by Yoann Guillot and Julien
Tinnes, has gone through a series of updates. The latest version has been
integrated with Metasploit and now supports MIPS assembly and the ability
to compile C code.

The Windows payload stagers have been updated to support targets with
NX CPU support. These stagers now allocate a read/write/exec segment of
memory for all payload downloads and execution.

Executables which have been generated by msfpayload or msfencode now
support NX CPUs. The generated executable is now smaller and more
reliable, opening the door to a wider range of uses. The psexec and
smb_relay modules now use an executable template thats acts like a real
Windows service, improving the reliability and cleanup requirements of
these modules.

The Reflective DLL Injection technique pioneered by Stephen Fewer of
Harmony Security has been integrated into the framework. The new payloads
use the “reflectivedllinjection” stager prefix and share the same binaries
as the older DLL injection method.

Client-side browser exploits now benefit from a set of new javascript
obfuscation techniques developed by Egypt. This improvement leads to a
greater degree of anti-virus bypass for client-side exploits.

Metasploit contains dozens of exploit modules for web browsers and
third-party plugins. The new browser_autopwn module ties many of these
together with advanced fingerprinting techniques to deliver more shells
than most pen-testers know what to do with.

This release includes a set of man-in-the-middle, authentication relay,
and authentication capture modules. These modules can be integrated with
a fake proxy (WPAD), a malicious access point (Karmetasploit), or basic
network traffic interception to gain access to client machines. These
modules tie together browser_autopwn, SMB relaying, and HTTP credential
and form capturing to pillage data from client systems.

Nearly all Metasploit modules now support IPv6 transports. IPv6 stagers
exist for the Windows and Linux platforms, opening the door for penetration
testing of pure IPv6 networks. The VNCInject and Meterpreter payloads have
been extensively tested over IPv6 sockets.

Efrain Torres’s WMAP project has been merged into Metasploit. WMAP is
general purpose web application scanning framework that can be automated
through integration with an attack proxy (ratproxy) or be accessed as
individual auxiliary modules.

Egypt’s new PHP payloads provide complete bind, reverse, and findsock
support for PHP web application exploits. If you are sick of C99 and R57
and looking to gain a “real” shell from one of the hundreds of RFI flaws
listed on milw0rm, the new PHP payloads work great against multiple
operating systems.

The db_autopwn command has been revamped to support port-based limits,
regex-based module matching, and limits on the number of spawned jobs. The
end result is a way to quickly launch specific modules against a specific
set of target machines. These changes were suggested and implemented by
Marcell ‘SkyOut’ Dietl (Helith).

Enjoy the release,

hdm      mc     egypt
pusscat  ramon   patrickw
I)ruid    et   kkatterjohn

——-

Taken from: Metasploit Mailing List

October 30, 2008

Interpid !

Filed under: News — Sp1d3r-73 @ 11:17 pm

Mark Shuttleworth bersama team-nya, hari ini resmi merilis versi terbaru dari Ubuntu yang bertajuk “Interpid Ibex”. Tidak banyak perubahan dari versi sebelumnya, malahan banyak ubuntu user yang tidak mau meng-upgrade ubuntunya, hal ini dikarenakan di versi sebelumnya mendukung Long Time Support. Namun, tidak ada salahnya jika anda ingin mencoba varian ubuntu terbaru ini. To download this version, visit here. To see the feature of this version, visit here or here.

October 20, 2008

Another Internet Core Bugs

Filed under: News — staff @ 5:49 am

1. Pakistan bermaksud mem-block salah satu content video pada youtube yang dinilai mendiskreditkan islam

2. Pakistan melalui salah satu ISP terbesar-nya melakukan proses blocking dengan memanfaatkan kapasitas ISP tersebut untuk memainkan proses routing protokol BGP agar request dari rakyat pakistan ke youtube.com diarahkan kembali kedalam network pakistan

3. (Agar tidak perlu bersusah payah || kesalahan engineer ISP || sang engineer memahami protokol BGP dengan baik yang akan memberikan efek pada AS router ISP lain) berhasil memblock request dari rakyat pakistan yang hendak meng-akses situs youtube. Bagaimana caranya? Cukup memberikan advertisement via router BGP untuk youtube.com terhadap AS disekitarnya yang menyatakan ‘apabila ada request ke youtube.com harap diarahkan kepada kami’, secara teknikal ini dapat dilakukan dengan memberikan advertisement berupa ‘prefixes’ yang lebih kecil untuk routing menuju youtube.com

4. Selang beberapa saat setelah itu, akses ke youtube.com outage selama 2 jam. Hasil investigasi menyatakan paket data dari tempat-tempat diberbagai belahan dunia ‘blackout’ di network pakistan.

5. Insiden ini mebuahkan investigasi dan pada akhirnya public-disclosure secara meluas (yang semula hanya diketahui beberapa pihak) mengenai bugs pada protokol BGP. Tingkah laku BGP ini telah menjadi hasil riset berbagai pihak sejak awal-awal kemunculannya termasuk close-disclosure yang dilakukan oleh old-skewl hacker kepada pihak inteligent mengenai bagaimana memanfaatkan bugs ini untuk mengawasi trafik internet dunia 10 tahun yang lalu.

6. Berbeda dengan bugs DNS dimana proses mass-patch dapat dilakukan, untuk masalah ini jauh lebih sulit untuk melakukan patch, dan mungkin baru akan benar-benar aman setelah berbulan-bulan / tahunan. Setiap pihak yang memiliki akses ke BGP router dapat melakukan man-in-the-middle attack ini. Jika traffic bisa diarahkan untuk eavesdropping, mungkin donk untuk melakukan dos?

7. Beberapa sumber juga menyatakan home router yang memiliki kemampuan BGP juga dapat dimanfaatkan untuk melakukan abuse.

8. Banyak group-group underground Indonesia yang mampu mendapatkan akses suatu router ISP, dan sudah hal klasik router ISP tersebut menjadi mainan anak-anak. Mungkin dengan adanya public disclosure seperti ini, kalangan underground bisa membantu pemerintah menerapkan RUU Anti Pornografi secara langsung dan teknikal tanpa perlu tetek bengek rapat-rapat berbau politik dan menghasilkan UUD (Ujung-Ujungnya Duid).

9. Please don’t take seriously point #8 above. Tentu saja pemerintah memiliki kemampuan jika memang ada kemauan untuk melakukan blocking terhadap situs-situs pornografi. Terutama dengan adanya proses monitoring dari ID-SIRTII tercinta (small and easy step from monitoring to blocking, isn’t it?).

Sumber: http://blog.wired.com/27bstroke6/2008/08/revealed-the-in.html

October 6, 2008

Dan Kaminsky’s hype fans

Filed under: News, Web Browser, Websecurity — staff @ 5:39 pm

Masih ingat dengan full-disclosure media hype Month Of Browser Bugs yang dimotori oleh HDM bulan juli 2006?!beberapa bulan setelah itu para fans full-disclosure media hype ikut-ikut an metode HDM dan menyelenggarakan ‘Month Of Something Bugs’ mereka masing-masing. Ada yang apple lah, ada yang kernel, dll.

Tahun 2008 sepertinya masa keemasan metode ‘partial-disclosure media hype’ oleh para researcher security, khususnya yang berasal dari USA. Dan kali ini mengikuti metode Dan Kaminsky, menunda full-disclosure dengan terlebih dahulu melakukan partial-disclosure yang memanfaatkan media hype. Hasilnya?! sebagian membuat masyarakat penasaran dan sebagian lain membuat masyarakat ketakutan karena tipe bugs-nya masih misterius.

Trik bisnis kah?! atau trik popularitas?! Don’t care. Yang pasti, tipe bugs-nya termasuk menarik untuk dibahas.

Dua jenis bugs yang mengikuti metode partial-disclsoure media hype Dan Kaminsky, dan keduanya sedang hangat dibahas saat ini. Yang pertama datang dari bidang webhacking, dan yang kedua datang dari bidang system hacking. Dan seperti biasa, keduanya ikut disulut dari salah satu mailing list tempat para researcher-researcher cerdas di bidang security berkumpul, Daily Dave mailing list.

Isu pertama datang dari kawasan webhacking mengenai “clickjacking”. Jeremiah Grossman dan Rsnake menunda full-disclosure mereka tentang clickjacking pada event OWASP ‘08 dan menggantinya dengan sesi ‘ClickJacking 20-Questions’. Hal ini membuat masyarakat kembali dalam status ’spekulasi’ mengenai bugs tersebut, karena Jeremiah dan Rsnake hanya memberikan penjelasan singkat tentang bugs tersebut. Hal ini mirip ketika Dan Kaminsky melakukan partial disclosure terhadap masyarakat dengan bugs DNS cache nya. Banyak pihak membicarakan mengenai clickjacking ini, diantaranya Giorgio Maone, Dave Aitel, hingga BeakingPoint Labs. Kita juga dapat melihat salah satu contoh spekulasi tersebut. Michal Zalewski juga ikut menjelaskan mengenai kemungkinan bugs ini serta memberikan solusi atas permasalahan tersebut. Media hyped semakin ramai dengan salah satu isi blog adobe mengenai clickjacking yang juga memberikan efek pada produk adobe.

Diantara semua, email penjelasan dari Michal Zalewski termasuk yang membuat media semakin heboh. Terutama karena salah satu solusi yang di-propose oleh dia untuk menangani masalah ini adalah ‘Rework everything we know about HTML / browser security models’. Well, at least semua researcher tersebut setuju bahwa kombinasi Mozilla Firefox + NoScript dapat mencegah user terkena efek serangan tersebut. Tapi seperti biasa, bugs ini rasanya tetap menarik untuk diikuti terutama jika mempengaruhi produk selain web browser.

Kandidat kedua untuk fans Dan’s Kaminksy partial-disclosure scenario adalah “New TCP Resource Exhaustion DOS (Denial of Service) Attack”. Fyodor (Nmap creator) baru saja hari ini menulis pada (again) mailing list Daily Dave mengenai spekulasinya terhadap jenis serangan Dos yang dikatakan ‘baru’ oleh Robert Lee dan Jack Louis. Berdasarkan keterangan Fyodor, basic jenis serangan tersebut sama sekali bukan jenis baru karena dia sudah meng-implementasikan nya pada tools Ndos beberapa tahun yang lalu namun tidak merilis tools tersebut, hanya menuliskan pada salah satu buku yang (bagian fyodor) juga di-buat free untuk dibaca secara online. I love fyodor ;).

Inti dari ‘New’ Dos tersebut terletak pada TCP Resource Exhaustion. Silahkan baca dengan cermat penjelasan Fyodor. Pada penjelasan tersebut kita dapat melihat bagaimana resource suatu sistem yang menggunakan protokol TCP/IP dapat dihabiskan. Sistem akan mengalokasikan beberapa resource-nya untuk menangani protokol TCP/IP dan penjelasan Fyodor diatas memperlihatkan bagaimana caranya menghabiskan resource tersebut secara cerdik.

Spekulasi tetaplah spekulasi, bisa jadi benar seperti yang terjadi pada bugs dns dan kaminsky, bisa jadi sebagian benar dalam arti memiliki pondasi yang mirip dengan spekulasi-spekulasi tersebut namun ’sang penemu’ memiliki cara lain untuk meng-extend bugs tersebut, bisa jadi completely false! Dalam arti, spekulasi orang-orang diseluruh dunia salah dan sang penemu merupakan orang jenius yang mampu menemukan bugs tersebut sendirian tanpa bisa disamai oleh researcher manapun.

Setelah membaca penjelasan Fyodor mengenai tehnik Ndos, mungkin ada yang bersedia menghabiskan waktunya untuk develop tools tersebut?! mungkin bisa menjadi alternative lain selain menggunakan mekanisme tembak.c secara distribusi :).

As always, media hype security circus is interesting. Hm, break time is over (sambil makan buah terakhir), put back my butt to daily job..

October 1, 2008

Happy Eid !

Filed under: News — Sp1d3r-73 @ 1:24 am

Beberapa negara Timur Tengah dan Eropa telah melaksanakan Idul Fitri pada 30 September 2008. Sedangkan di Indonesia dan beberapa negara lain dikabarkan 1 syawal akan jatuh pada tanggal 1 Oktober 2008. Walaupun ada beberapa perbedaan disini, itu tidak menjadi masalah untuk Kecoak Elektronik Indonesia mengucapkan Selamat Hari Raya Idul Fitri 1429 H, Minal Aidzin Wal Faidzin, Mohon Maaf Lahir dan Bathin, jika selama ini ada kesalahan dari kami, sekiranya kami mengucapkan maaf yang sebesar-besarnya

September 23, 2008

idsecconf2008

Filed under: News — staff @ 8:11 pm

Underground goes conference, is that allowed?! *lol*

idsecconf 2008 awalnya dipublikasikan oleh group ECHO pada rilis ezine terbaru, intinya mengadakan suatu konferensi security yang bertahap nasional bagi masyarakat underground Indonesia. Bentuk acara-acara berbau konferensi dengan tema security rasanya sudah tidak asing di Indonesia, ada yang targetnya untuk anak sekolahan, umum, ataupun industri. Para penyelenggaaranya pun umumya terbatas pada ruang lingkup tertentu, seperti kelompok tertentu, organisasi tertentu, ataupun perusahaan tertentu.

Gerakan internet underground di Indonesia dimulai sejak akhir tahun 90an, dan terus berkembang hingga sekarang. Beberapa kelompok ada yang pecah, mati, tapi ada juga yang tetap bertahan sampai saat ini. Sulit juga untuk dipungkiri bahwa para profesional di bidang IT, network, security, telekomunikasi saat ini berasal dari individu-individu yang belajar secara otodidak dan mandiri melalui underground. Dan sulit juga untuk dipungkiri bahwa banyak sekali orang-orang dari komunitas underground memiliki pengetahuan unik yang belum diketahui oleh para profesional/akademis khususnya dibidang internet security.

Dengan banyaknya komunitas underground di Indonesia yang selama ini saling berinteraksi hanya melalui internet, tentu akan sangat menarik jika kita semua bisa bertemu muka dan berkumpul bersama serta saling berbagi pada event tersebut. Yap, masyarakat luar negeri telah lama melakukan hal ini, terbukti dengan adanya event-event seperti CCC dan defCon dimana semua berkumpul untuk saling berbagi dan seringkali menghasilkan sesuatu (new technique, coding, exploit, security tools) selepas even-even tersebut.

ECHO melakukan inisialisasi awal untuk even komunitas underground ini namun pada pelaksanaannya melibatkan banyak komunitas underground yang exist di Indonesia. Let’s say, even ini akan menjadi ajang pertemuan dari underground untuk underground. So, idsecconf membutuhkan dukungan dari para pecinta underground diseluruh Indonesia dan diharapkan menjadi acara kita bersama tanpa ada embel-embel bisnis, publikasi, media massa, government didalamnya. Murni untuk saling berbagi, berkumpul, dan bermain (yes, there will be hacking game too) bersama.

Prove your concept, code, experience, research, hacking, reversing in these event. Share what you have, and enjoy what other’s share to you.

See ya there guys! ;)

August 15, 2008

Karmetasploit & Bailiwicked article

Filed under: News — Cyberheb @ 1:38 am

Huff, it’s been a busy week lately. Just wanna update some news now.

Metasploit mengeluarkan rilis tools terbaru yang merupakan gabungan antara Metasploit dan Karma. Karma merupakan tools dino dai zovi yang digunakan untuk menyerang kelemahan implementasi protokol pada wireless connection. Client umumnya akan mengirimkan beacon packet untuk melakukan asosiasi kedalam suatu network, dan jika client tersebut sudah pernah melakukan asosiasi maka proses selanjutnya akan dilakukan otomatis. Karma dapat berpura-pura menjadi AP untuk proses asosiasi tersebut, dan menjebak client untuk menggunakan Karma dalam mengakses internet. Dengan begitu karma dapat menjadi Man-in-the-middle untuk setiap koneksi. Windows telah melakukan update untuk proses asosiasi sejak dino mempresentasikan hal ini beberapa tahun yang lalu.

Dengan bantuan metasploit, karma dapat menjadi lebih powerful. Informasi mengenai Karmetasploit dapat dibaca pada link ini.

Next, I create simple article in Indonesian language which explain about Bailiwicked attack. Di publish oleh ezine echo terbaru.

AR dari securebit merilis tehnik eksploitasi DNS bugs menggunakan CNAME response yang dapat melakukan overwrite record ‘A’ apapun. Hal ini berbeda dengan implementasi eksploit yang bertebaran di internet dimana cache tidak dapat di overwrite jika sudah terdapat pada DNS cache. Informasi lengkap nya bisa dibaca pada link ini.

Cheers!

July 28, 2008

BackTrack 3 Final

Filed under: News — staff @ 9:34 pm

No GUI installer. Jadi untuk install ke harddisk/usb harus menggunakan command line:

1) Copy file satu per satu dari cd ke harddisk

2) Chroot ke sistem linux yang di harddisk

3) Reload boot loader ke MBR harddisk

3 prinsip yang sangat tidak asing bagi para pengguna Gentoo ;). Check the complete step from here . Just installed it on MacBook easily.

Snapshot?!

Backtrack on Macbook

July 23, 2008

DNS Vuln Leaked

Filed under: News — Cyberheb @ 12:36 pm

Tiap orang berpendapat beda-beda, namun rasanya memang cukup aneh jika informasi tentang DNS vuln yang membuat masyarakat penasaran leaked begitu saja. Dimulai dari posting halvar flake pada mailing list dailydave yang awalnya mempertanyakan apakah salah jika berspekulasi tentang DNS bugs karena Dan Kaminsky membuat pernyataan kepada publik untuk tidak berdiskusi tentang DNS bugs yang akan di presentasikan nya di blackhat mendatang. Spekulasi halvar dijadikan sebagai alasan atau referensi bagi matasano untuk memposting informasi lebih lengkap tentang bugs DNS tersebut.

Thomas ptacek dan Dino Dai Zovi dari matasano sempat melakukan teleconference khusus dengan Dan Kaminsky mengenai bugs DNS, dan bisa dikatakan bahwa mereka mendapatkan informasi cukup lengkap dan berjanji untuk tidak mempublish kepada masyarakat. Tapi sepertinya skenario berubah, dan postingan matasano tentang informasi DNS tersebut dinyatakan ‘kecelakaan’ . Postingan matasano menjadikan spekulasi halvar sebagai referensi. Dan sekarang, kredibilitas Thomas mulai dipertanyakan karena tidak bisa menjaga rahasia dengan baik dan membuatnya leak ke internet (walaupun postingan matasano sudah di hapus dari blog, namun sudah menyebar luas di internet via blog / feed).

Mungkin benar kata Stephen Esser, semua ini hanya bentuk lain dari drama theater yang skenarionya sudah dipersiapkan sebelumnya. Atau hanya persaingan antar white-hat yang ‘terpesona’ dengan metode patch Dan Kaminsky yang belum pernah dilakukan sebelumnya dan dengan segala cara ingin merusak jalan cerita?! layaknya naluri hacker yang ingin terus merusak alur program dengan kutak katik EIP dan bypass ASLR maupun DEP atau /GS?! Well, apapun ceritanya bugs DNS ini tetap menarik, kalaupun bugs ini berbeda dengan bugs DNS yang ditemukan oleh Dan Kaminsky maka spekulasi halvar flake merupakan jenis bugs yang cukup berbahaya juga.

Anyway, ini postingan dari Matasano yang memeberikan gambaran cukup lengkap tentang bugs pada protokol DNS (yap, protokol, itu sebabnya cukup sulit ditemukan oleh researcher biasa yang umumnya tidak memahami protokol dengan baik).

######################### By Matasano

Reliable DNS Forgery in 2008: Kaminsky’s Discovery

0.

The cat is out of the bag. Yes, Halvar Flake figured out the flaw Dan Kaminsky will announce at Black Hat.

1.

Pretend for the moment that you know only the basic function of DNS — that it translates WWW.VICTIM.COM into 1.2.3.4. The code that does this is called a resolver. Each time the resolver contacts the DNS to translate names to addresses, it creates a packet called a query. The exchange of packets is called a transaction. Since the number of packets flying about on the internet requires scientific notation to express, you can imagine there has to be some way of not mixing them up.

Bob goes to to a deli, to get a sandwich. Bob walks up to the counter, takes a pointy ticket from a round red dispenser. The ticket has a number on it. This will be Bob’s unique identifier for his sandwich acquisition transaction. Note that the number will probably be used twice — once when he is called to the counter to place his order and again when he’s called back to get his sandwich. If you’re wondering, Bob likes ham on rye with no onions.

If you’ve got this, you have the concept of transaction IDs, which are numbers assigned to keep different transactions in order. Conveniently, the first sixteen bits of a DNS packet is just such a unique identifier. It’s called a query id (QID). And with the efficiency of the deli, the QID is used for multiple transactions.

2.

Until very recently, there were two basic classes of DNS vulnerabilities. One of them involves mucking about with the QID in DNS packets and the other requires you to know the Deep Magic.

First, QIDs.

Bob’s a resolver and Alice is a content DNS server. Bob asks Alice for the address of WWW.VICTIM.COM. The answer is 1.2.3.4. Mallory would like the answer to be 6.6.6.0.

It is a (now not) secret shame of mine that for a great deal of my career, creating and sending packets was, to me, Deep Magic. Then it became part of my job, and I learned that it is surprisingly trivial. So put aside the idea that forging IP packets is the hard part of poisoning DNS. If I’m Mallory and I’m attacking Bob, how can he distinguish my packets from Alice’s? Because I can’t see the QID in his request, and the QID in my response won’t match. The QID is the only thing protecting the DNS from Mallory (me).

QID attacks began in the olden days, when BIND simply incremented the QID with every query response. If you can remember 1995, here’s a workable DNS attack. Think fast: 9372 + 1. Did you get 9372, or even miss and get 9373? You win, Alice loses. Mallory sends a constant stream of DNS responses for WWW.VICTIM.COM. All are quietly discarded —- until Mallory gets Bob to query for WWW.VICTIM.COM. If Mallory’s response gets to your computer before the legitimate response arrives from your ISP’s name server, you will be redirected where Mallory tells you you’re going.

Obvious fix: you want the QID be randomly generated. Now Alice and Mallory are in a race. Alice sees Bob’s request and knows the QID. Mallory has to guess it. The first one to land a packet with the correct QID wins. Randomized QIDs give Alice a big advantage in this race.

But there’s a bunch more problems here:

If you convince Bob to ask Alice the same question 1000 times all at once, and Bob uses a different QID for each packet, you made the race 1000 times easier for Mallory to win.

If Bob uses a crappy random number generator, Mallory can get Bob to ask for names she controls, like WWW.EVIL.COM, and watch how the QIDs bounce around; eventually, she’ll break the RNG and be able to predict its outputs.

16 bits just isn’t big enough to provide real security at the traffic rates we deal with in 2008.

Your computer’s resolver is probably a stub. Which means it won’t really save the response. You don’t want it to. The stub asks a real DNS server, probably run by your ISP. That server doesn’t know everything. It can’t, and shouldn’t, because the whole idea of DNS is to compensate for the organic and shifting nature of internet naming and addressing. Frequently, that server has to go ask another, and so on. The cool kids call this “recursion”.

Responses carry another value, too, called a time to live (TTL). This number tells your name server how long to cache the answer. Why? Because they deal with zillions of queries. Whoever wins the race between Alice and Mallory, their answer gets cached. All subsequent responses will be dropped. All future requests for that same data, within the TTL, come from that answer. This is good for whoever wins the race. If Alice wins, it means Mallory can’t poison the cache for that name. If Mallory wins, the next 10,000 or so people that ask that cache where WWW.VICTIM.COM is go to 6.6.6.0.

3.

Then there’s that other set of DNS vulnerabilities. These require you to pay attention in class. They haven’t really been talked about since 1997. And they’re hard to find, because you have to understand how DNS works. In other words, you have to be completely crazy. Lazlo Hollyfeld crazy. I’m speaking of course of RRset poisoning.

DNS has a complicated architecture. Not only that, but not all name servers run the same code. So not all of them implement DNS in exactly the same way. And not only that, but not all name servers are configured properly.

I just described a QID attack that poisons the name server’s cache. This attack requires speed, agility and luck, because if the “real” answer happens to arrive before your spoofed one, you’re locked out. Fortunately for those of you that have a time machine, some versions of DNS provide you with another way to poison the name server’s cache anyway. To explain it, I will have to explain more about the format of a DNS packet.

DNS packets are variable in length and consist of a header, some flags and resource records (RRs). RRs are where the goods ride around. There are up to three sets of RRs in a DNS packet, along with the original query. These are:

Answer RR’s, which contain the answer to whatever question you asked (such as the A record that says WWW.VICTIM.COM is 1.2.3.4)

Authority RR’s, which tell resolvers which name servers to refer to to get the complete answer for a question

Additional RR’s, sometimes called “glue”, which contain any additional information needed to make the response effective.

A word about the Additional RR’s. Think about an NS record, like the one that COM’s name server uses to tell us that, to find out where WWW.VICTIM.COM is, you have to ask NS1.VICTIM.COM. That’s good to know, but it’s not going to help you unless you know where to find NS1.VICTIM.COM. Names are not addresses. This is a chicken and egg problem. The answer is, you provide both the NS record pointing VICTIM.COM to NS1.VICTIM.COM, and the A record pointing NS1.VICTIM.COM to 1.2.3.1.

Now, let’s party like it’s 1995.

Download the source code for a DNS implementation and hack it up such that every time it sends out a response, it also sends out a little bit of evil — an extra Additional RR with bad information. Then let’s set up an evil server with it, and register it as EVIL.COM. Now get a bunch of web pages up with IMG tags pointing to names hosted at that server.

Bob innocently loads up a page with the malicious tags which coerces his browser resolve that name. Bob asks Alice to resolve that name. Here comes recursion: eventually the query arrives at our evil server. Which sends back a response with an unexpected (evil) Additional RR.

If Alice’s cache honors the unexpected record, it’s 1995 —- buy CSCO! —- and you just poisoned their cache. Worse, it will replace the “real” data already in the cache with the fake data. You asked where WWW.EVIL.COM was (or rather, the image tags did). But Alice also “found out” where WWW.VICTIM.COM was: 6.6.6.0. Every resolver that points to that name server will now gladly forward you to the website of the beast.

4.

It’s not 1995. It’s 2008. There are fixes for the attacks I have described.

Fix 1:

The QID race is fixed with random IDs, and by using a strong random number generator and being careful with the state you keep for queries. 16 bit query IDs are still too short, which fills us with dread. There are hacks to get around this. For instance, DJBDNS randomizes the source port on requests as well, and thus won’t honor responses unless they come from someone who guesses the ~16 bit source port. This brings us close to 32 bits, which is much harder to guess.

Fix 2:

The RR set poisoning attack is fixed by bailiwick checking, which is a quirky way of saying that resolvers simply remember that if they’re asking where WWW.VICTIM.COM is, they’re not interested in caching a new address for WWW.GOOGLE.COM in the same transaction.

Remember how these fixes work. They’re very important.

And so we arrive at the present day.

5.

Let’s try again to convince Bob that WWW.VICTIM.COM is 6.6.6.0.

This time though, instead of getting Bob to look up WWW.VICTIM.COM and then beating Alice in the race, or getting Bob to look up WWW.EVIL.COM and slipping strychnine into his ham sandwich, we’re going to be clever (sneaky).

Get Bob to look up AAAAA.VICTIM.COM. Race Alice. Alice’s answer is NXDOMAIN, because there’s no such name as AAAAA.VICTIM.COM. Mallory has an answer. We’ll come back to it. Alice has an advantage in the race, and so she likely beats Mallory. NXDOMAIN for AAAAA.VICTIM.COM.

Alice’s advantage is not insurmountable. Mallory repeats with AAAAB.VICTIM.COM. Then AAAAC.VICTIM.COM. And so on. Sometime, perhaps around CXOPQ.VICTIM.COM, Mallory wins! Bob believes CXOPQ.VICTIM.COM is 6.6.6.0!

Poisoning CXOPQ.VICTIM.COM is not super valuable to Mallory. But Mallory has another trick up her sleeve. Because her response didn’t just say CXOPQ.VICTIM.COM was 6.6.6.0. It also contained Additional RRs pointing WWW.VICTIM.COM to 6.6.6.0. Those records are in-bailiwick: Bob is in fact interested in VICTIM.COM for this query. Mallory has combined attack #1 with attack #2, defeating fix #1 and fix #2. Mallory can conduct this attack in less than 10 seconds on a fast Internet link.

July 14, 2008

Still about DNS bugs…

Filed under: News — Cyberheb @ 12:00 am

Ramai sekali perbincangan mengenai hole DNS yang ditemukan oleh Dan Kaminsky, dan banyak orang-orang jenius dari komunitas security angkat bicara, yang paling menarik perhatian adalah tim Matasano dimana Thomas Ptacek mempertanyakan tentang sikap Dan Kaminsky yang menunda full-disclosure hingga event blackhat mendatang. Termasuk mempertanyakan keseriusan hole tersebut karena menurut ptacek (berdasarkan patch yang di applied oleh vendor) hole ini hanya variasi dari serangan cache poisoning terhadap DNS. Cache poisoning sebelumnya bermasalah dikarenakan source port udp yang digunakan oleh DNS server dapat diprediksi dengan mudah, hal ini dapat membuat cache suatu dns server ‘teracuni’ dan diarahkan ke server attacker.

Hasil analisis Thomas Ptacek, bukan hanya masalah source port, namun juga randomisasi XID. Dan menurut ptacek, hanya dengan tambahan bugs semacam ini yang sebetulnya telah diperbaiki oleh banyak DNS server beberapa tahun lalu tidak perlu membuat kehebohan seperti yang dilakukan Dan Kaminsky. Namun setelah Ptacek mendapatkan penjelasan dari Dan Kaminsky secara lengkap mengenai bug DNS tersebut, ptacek mengakui bugs tersebut merupakan hal serius yang harus ditangani dengan baik. Walaupun, DJBDNS telah diklaim tidak vulnerable terhadap bugs tersebut.

Well, sangat menarik membaca comment di blog matasano mengenai hal ini. Banyak komunitas security yang bertanya-tanya seperti apakah hole DNS yang dimaksud oleh Dan Kaminsky, mengapa hole tersebut begitu berbahaya?! Perdebatan mengenai DNS ini bisa dibaca pada blog matasano.

Anyway, DNS merupakan salah satu infrastruktur paling penting di internet. Kenapa?! karena DNS lah yang akan menunjukan kita alamat sebenarnya dari server yang akan dituju. Jika attacker bisa menguasai DNS dan mengarahkan pengunjung ke suatu server yang telah di kontrol, maka berarti game-over.

Perdebatan ini sekaligus juga menunjukan perkembangan dunia blog, dimana isi komentar bisa dijadikan sebagai tempat untuk berdiskusi. Sepertinya fungsi mailing list dan forum sebagai media diskusi mulai mendapatkan saingan :).

Blog By You-Know-What