Brontok Remover Shell Script

Today I shared my whole home directory in read-write mode to a mostly Windows only network. It was such a bad idea, later I found out that my home directory was being filled with nonsense .exe files scattering all over the place. Yes, it was the notorious [Brontok virus](https://priyadi.net/archives/2006/01/11/virus-brontok-dan-avast-antivirus/).

But at least this is a chance to document how I’ve [dealt](https://priyadi.net/archives/2006/03/06/ambiguitas-istilah-hacker/) with this virus several months ago. The following quick and dirty shell script saved my day:


#!/bin/sh
MD5=c27efafad30060e52770c4cda28d3183
SIZE=40928

find -type f -iregex '.*\.exe$' -size ${SIZE}c -print0 \
   | xargs -0 md5sum \
   | grep "^$MD5" \
   | sed -e 's/^[a-z0-9]* *//g' -e "s/^/'/g" -e "s/$/'/g" \
   | xargs -p -n1 rm -f

If you want to use the script, keep these in mind:

* Change `MD5` variable to whatever MD5 sum your Brontok variant have.
* Change `SIZE` variable to match the size of your Brontok variant.
* Remove `-p` from last `xargs` command to suppress confirmation. Or change it to `xargs -n1 echo` in order to show all files that are detected as Brontok virus without really going to remove them.

This should have been obvious, but it was done in a non-Windows computer. If you are going to use it in Windows, you will need something like [Cygwin](http://www.cygwin.com).

71 comments

  1. Bisa kena Brontox juga ? Gawat.
    kalau wondows I masih make Norton :D. kalau ngga ya dibiarin ajah :))
    Salam tempel ..

  2. #3 pake flash disk yang ada fitur lock via hardware, alias kunci geser, tapi di flash disk jaman sekarang sudah mulai langka

  3. #3 ane pakai USB card reader untuk SD card lalu pakai SD Card 1 GB yang ada write protectnya :D

  4. In case installing Cygwin means too much hasle for you, you still can use any *nix live cd to use this script. In case your Windows partition using some sort of filesystem that has no write support for your current kernel, you still can use this script by modifying it to generate some sort of batch command (*.bat) which you can use later when booting into windows.

    #!/bin/sh
    MD5=c27efafad30060e52770c4cda28d3183
    SIZE=40928

    find $1 -type f -iregex '.*\.exe$' -size ${SIZE}c -print0 \
    | xargs -0 md5sum \
    | grep "^$MD5" \
    | sed -e 's/^[a-z0-9]* *//g' -e "s/^/'/g" -e "s/$/'/g" \
    | xargs -n1 echo del

    And then run it like this:
    ./above_script.sh /mnt/win_c > clean_c.bat

    Afterwards, copy clean_c.bat to you flashdisk or any temporary storage so you can access it when you’ve already booted into Windows. Boot your windows, open cmd, cd to C:\. Copy clean_c.bat there and run it.

    Theoriticaly it will work but I haven’t tried yet :p. So you can try it at your own risk :p

    #14 coba maen nfsu pake backend aalib ;). Ada gk ya SDL yang pakai aalib

  5. wah…walopun masih pake winblows, sampe detik ini alhamdulillah belon ngerasain virus brontoks…..
    pake symantec av, trus di router port2 ini di block:
    range 135 139, range 1022 1023, 445, range 3127 3198, 3332, 5554, 9996, 9997, 6667, 2745 ….
    nyambung gak yah port2 tsb dgn virus brontoks :-?

  6. padahal bikin brontok cuma pake vb 6 doang..hahaha..
    efeknya ngeriiiiiii..

    mending pake Linux, komp saya aja gak pernah pake anti virus apapun…

  7. Pake AVG Free Update terbaru Brontoknya langsung Rontok
    Lagian AVG Free(bebas) loh ngak perlu ngeluarin duit , coba miki, dijamin brontoknya langsung rontok
    daengbaco
    (orang makassar ces)

  8. #22 kalo “pembasmi virus windows” versi mini yang bisa dibawa-bawa pake flashdisk banyak, pake aja distro GNU/Linux yg kecil seperti Damn Small Linux, Austrumi, Puppy, Knopperdisk, Slax Popcorn Edition atau pake yg emang khusus buat rescue seperti SystemRescue, SuperRescue, Trinity Rescue Kit dll :d

  9. Memang virus brontok selalu bermasalah di kantor. Sampe bos saya minta saya beli neril.. Tapi pake antivir terbaru memang ke-detect kok.. :)

  10. fren… gw msh belom ngerti.. gimana cara menggunakan scrip remove itu. maksudnya caranya gt.. di masukkan kemana kode tsb. bls ke t4ku ya… tengkyuuu.. oiya ada yang tau cara hapus manual virus brontox di flasdisk ga??

  11. Penawar Brontok 1.2 telah saya siapkan…
    di mana ia memiliki fungsi

    – Penawar Brontok VarX tidak memerlukan program ini run di dalam safe mode, hanya run sahaja di dalam keadaan window normal.
    – Penawar Brontok VarX mempunyai scanning engine yang laju dan cepat dan berkesan mencari virus brontok sisa-sisa yang ditinggalkan.
    – Membetulkan semula folder option dan registry.
    – Membetulkan semula file msvbvm secara automatik.
    – Mempunyai pilihan sama ada untuk dibuang ke Recyle Bin atau buang terus dari sistem.
    – Mempunyai scanning engine yang menyokong kriteria virus Brontok, membolehkan ia mencari Brontok yang baru di mana kebanyakan Anti Virus pun tiada fungsi ini.. (I wonder why they can’t do it..?)

    kamu semua boleh mencuba download di
    http://www.kaer-media.org/penawar-brontok/

  12. Penawar Brontok 1.2 telah saya siapkan…
    di mana ia memiliki fungsi

    http://www.kaer-media.org/penawar-brontok/

    – Penawar Brontok VarX tidak memerlukan program ini run di dalam safe mode, hanya run sahaja di dalam keadaan window normal.
    – Penawar Brontok VarX mempunyai scanning engine yang laju dan cepat dan berkesan mencari virus brontok sisa-sisa yang ditinggalkan.
    – Membetulkan semula folder option dan registry.
    – Membetulkan semula file msvbvm secara automatik.
    – Mempunyai pilihan sama ada untuk dibuang ke Recyle Bin atau buang terus dari sistem.
    – Mempunyai scanning engine yang menyokong kriteria virus Brontok, membolehkan ia mencari Brontok yang baru di mana kebanyakan Anti Virus pun tiada fungsi ini.. (I wonder why they can’t do it..?)

    kamu semua boleh mencuba download di
    http://www.kaer-media.org/penawar-brontok/

    semoga ia dapat membantu… :)

  13. com Qkene brontok, truz ku remove pake brontok remover! tapi ko virusnya balik lagi????????:o

  14. :d:d:d:d
    flash disk yang ada antivirusnya ada ga??:-”
    nunggu jawaban… buat yang pengen kenalan contact me at down_under_the_ice@yahoo.com:d:d:d:d:d;);)
    :-?:-?:-?:-?:-?:-?
    eh buat yang punya antivirus contact me yahhhh!!!!
    i love u alll
    aaaaaaaaaarrrrrrrrrrrrrrrrrrggggggggggghhhhhhhhhhhhhh:-“:-“:-“:-“:-“:-“

  15. gwe make deep frezze cuek aja ah….. drpd puyeng2 FORMAT!!!! :D:D:D abis bingung + bengong jg sih virus duluan br anti virus… emang dah otak pedagang aanti virus disono jago2 :D

  16. sorry. im not a computer expert so i am still lost and this brontok is eating my software fast. sigh! if only i could talk to the brontok virus maker i will curse him to death!!! grrr…. thanks for trying to help anyway…

  17. Patutla benci ni.gapo ni brontok . mujur dah dapat remover. Cari kat yahoo .type brontok.ada sokmo:d

  18. brontok,brontok sokmo.komputer kawe dah nak naik gila ni.Mujur ada go ni,gapo-gapo,hok remover,kalau tok,nak naik gila benar.Kalau tahu siapa hok buat brontok,mampus dia
    :-“:-w

  19. :) Tai tuch Brontok Sialan…

    Komputer gw isinya begituan smua….

    Fuck buat yg bikin. Selamat anda berhasilll!!!!

    Fuck You damn Motherfucker shit….

  20. hampir 1 mgg ini aq pusing dengan tuh virus[brontok dan perkembanganya] ada nggak ya,..:-? yang tahu kasih anti virusnya yang ampuh? tuooooolong senior smua pleace:((

  21. WAR BETWEEN VIRUS-ANTIVIR
    brontok?? pernah, tapi bisa selalu di atasi koq…
    antivirus terupdate apapun yg terkenal pasti bisa.
    penglmn pribadi, biasanya manual dulu (under dos) ngeremove virus brontok (terbaru).
    Yg bikin virus pasti pake otak bwt mikirin caranya,
    Yg bikin anti kaya’ mas Pri, pasti pake otak jg kan… ga kaya gw, nulis comment ga perlu mikir dalem (jero teuing mah… bisi ghelo euy…) :-w

  22. oow my god…nih viruz kok g da hbs ny..percuma gua format..ntar lm2 kn lagi…hah….:((..fening liat nih viruz…ada yg tau caran y g para senior…tuolonngggggg bgt….PLIZZZZZZZ……..:((:(

  23. Horeeeee peserta yang posting 2008 Pertama :)>-:)>-:)>-
    Semoga Para pembuat Virus senantiasa bertaubat.. karena sesungguhnyalah kerusakan yang mereka buat… dan Semoga Allaah mengampuni mereka, sehingga kelak mereka terlepas dari Ancaman Neraka…!!!!!!!!!!!! AMIINN:):):):)

Leave a Reply to budiw Cancel reply

Your email address will not be published. Required fields are marked *