Elite Malduino – Kesan pertama

beberapa saat kembali, saya menyusun artikel tentang Malduino, perangkat Badusb open-source yang berbasis di Arduino. Saya menemukan pekerjaan yang menarik sehingga saya mendaftar untuk versi elit serta cukup pasti, tukang pos yang ramah menjatuhkannya di kotak surat saya Jumat lalu, yang berarti saya harus bermain-main dengan akhir pekan. Bagi mereka yang melewatkan artikel, Malduino adalah gadget USB yang mampu meniru keyboard serta menyuntikkan keystrokes, antara lain. Ketika dalam casing yang tepat, itu hanya akan terlihat seperti USB flash drive. Ini seperti hal-hal yang Anda lihat di film-film di mana seorang pria menyumbat gadget serta secara otomatis meretas komputer. Ini dikirim dalam dua versi, lite serta elit, keduanya didasarkan pada ATmega32U4.

Versi lite benar-benar kecil, selain konektor USB itu hanya berisi sakelar, yang memungkinkan individu untuk memilih antara berjalan serta mode pemrograman, serta LED, yang menunjukkan kapan skrip selesai berjalan.

Sketsa Elite Malduino Asli serta Prototipe Lite
Versi elit lebih besar, termasuk pengunjung kartu mikro-SD serta empat sakelar dip, yang memungkinkan individu untuk memilih skrip mana yang akan dijalankan dari kartu. Itu juga memiliki LED, yang menunjukkan kapan skrip selesai untuk dijalankan. Ini memungkinkan individu untuk menumpahkan firmware hanya ketika kemudian memprogram skrip injeksi penekstroke yang disimpan dalam kartu micro-sd, berbeda dengan versi Lite yang perlu diputar setiap kali seseorang ingin menjalankan skrip yang berbeda.

Ini adalah dua malduino serta karena mereka diprogram langsung dari Arduino IDE, setiap fungsi yang baru saja saya sebutkan dapat diprogram ulang, bertujuan ulang atau turun bersama-sama. Anda dapat membeli satu dan hanya memilih untuk memanfaatkannya seperti arduino ‘normal’, meskipun tidak ada banyak pin untuk bermain. Fleksibilitas ini adalah salah satu hal pertama yang saya sukai tentang hal itu serta benar-benar mendorong saya untuk mengambil bagian dalam kampanye pendanaan kerumunan. check out untuk ulasan lengkap.

Perangkat Keras

Malduino Elite vs USB flash drive
Jadi papan elit muncul sebagai rutin dan saya menemukan diri saya lama untuk melihatnya. Meskipun lebih panjang dari versi lite, itu masih agak kecil, berukuran sekitar 4,6 cm x 1,1 cm (sekitar 1,8 dalam x 0,43), yang dengan cepat Anda beradaptasi dengan kasus USB lama, meskipun Anda harus memotong beberapa Lubang untuk sakelar dip serta kartu mikro-sd. Dalam kampanye kerumunan-pendanaan, sketsa asli adalah untuk versi 3 dip sih namun elit akhir memiliki empat, yang saya temukan dengan baik. Saya mencolokkannya ke komputer lama, setelah beberapa pertimbangan tentang firmware yang mungkin dikirim dengan serta apa yang mungkin dilakukan untuk laptop saya, serta yakin cukup dipimpin merah muncul. serta itu saja. tidak ada lagi.

Setelah bermain-main dengan sakelar serta berolahraga beberapa RTFM, saya menyadari bahwa firmware itu dikirimkan kemungkinan besar beberapa jenis Q.C. Uji untuk dips, yang membuat Malduino mengeluarkan angka 1 hingga 4 (sebenarnya mensimulasikan KeyPress 1 hingga 4), tergantung pada sakelar mana. Sejauh ini sangat baik, itu berfungsi dan saya telah melihat papan PCB yang lebih buruk dari yang satu ini. Dewan memiliki lubang untuk enam pin, yang saya tidak melacak ke pengontrol mikro dan juga saya tidak mengerti untuk apa mereka.

Pengaturan

Menyiapkan Kebutuhan Malduino bahwa Anda telah menginstal IDE Arduino dan sebanyak tanggal. Anda akan membutuhkan untuk membuka papan dewan serta mengatur papan Sparkfun karena elit diprogram sebagai ‘Sparkfun Pro Micro’ berjalan pada 3,3 v dan 8 MHz. Maka Anda membutuhkan situs web Konverter Script Malduino yang melayani sejumlah tujuan:

Ini memungkinkan untuk mengkonversi skrip antara versi lite serta elit

Ini memungkinkan Anda untuk memilih bahasa desain keyboard Anda

Itu otomatis menghasilkan pekerjaan Arduino untuk Anda impor ke IDE

Untuk versi elit, hanya menghasilkan skrip sederhana atau bahkan kosong untuk mengunduh proyek, karena ketika dalam operasi ‘normal’ Anda hanya akan mem-flash Malduino ketika kemudian menggunakan kartu Micro-SD untuk menyimpan skrip baru.

Catatan tentang flashing, jika Anda memanfaatkan distribusi berbasis Debian, Anda dapat menemukan beberapa masalah seperti yang saya lakukan dan juga tidak dapat mem-flash perangkat. Seperti individu pada pos paling berguna ini, Modem-Manager saya mencoba berbicara dengan Malduino setelah setiap reset serta bingung Avrdude sampai mati. Solusinya adalah menambahkan aturan UDEV ke “/etc/udev/rules.d/77-m-usb-device-blandlist-local.rules”, pujian untuk [Socrim]:

1
2.
3.
4.
5.
6.
7.
8.
Tindakan! = & Quot; Tambahkan | Ubah & quot;, goto = & quot; mm_usb_device_blacklist_end & quot;
Subsistem! = & Quot; USB & quot;, goto = & quot; mm_usb_device_blacklist_local_end & quot;
Env {devtype}! = & Quot; usb_device & quot ;, goto = & quot; mm_usb_device_endlistlist_end & quot;

Attrs {idvendor} == & quot; 1b4f & quot; Attrs {idproduct} == & quot; 9204 & quot;, env {id_mm_device_ignore} = & quot;
Attrs {idvend.or}=="1b4f" ATTRS{idProduct}=="9203", ENV{ID_MM_DEVICE_IGNORE}="1"

LABEL="mm_usb_device_blacklist_local_end"

The Software

Since I’m running Linux, a quick shortcut to run a command is the ALT-F2 combination. So I script that into a data as well as save it to 1111.txt. The Elite searches the Micro-SD card for a data corresponding to the present dip switch state. lets state the dip switch 2 as well as 4 are ON. In this case, the software application tries to discover the data named 0101.txt as well as parse its contents (as in dip switch order 1,2,3,4 as well as not the binary representation of the number 2 as well as 4) . When it finishes, the red LED starts flashing quickly. My simple script was:

1
2.
3.
4.
5.
6.
7.
8.
9.
10
DELAY 2000
ALT F2
DELAY 1000
STRING xterm
DELAY 1000
MEMASUKI
DELAY 1000
STRING id
DELAY 1000
MEMASUKI

But it was not working. almost all commands worked however the ALT-F2 combo was not working properly. Close, however no cigar. No ALT-F2, no run command window. I’ve already lazy-browsed the source code a bit since I truly didn’t have a great deal of time on my hands however I needed to figure this out. The offending code was this:

1
2.
3.
4.
5.
6.
else if(equals(s,e,"F1",3)) Keyboard.press(KEY_F1);</pre>

else if(equals(s,e,"F2",3)) Keyboard.press(KEY_F2);

else if(equals(s,e,"F10",3)) Keyboard.press(KEY_F10);
else if(equals(s,e,"F11",3)) Keyboard.press(KEY_F11);

A custom equals function was getting size 3 for the strings of the function keys, like “F2”. It was okay for “F10”, “F11” as well as “F12”, however failed for the rest of the keys. altering 3 to 2 did the trick, however my Portuguese keyboard design started to interfere with other test scripts. So I altered the code to include PT as well as UK layouts, altering them in a #define at compile time.

It would be awesome if it was possible to gain access to the SD card from the computer as a routine USB volume. I don’t understand precisely exactly how feasible that is, however it does not include the present firmware. I still wished to be able to output the material of an arbitrary data on the SD card to the screen, so I added one more script function called ECHOFILEHEX that outputs the material of a data in the SD card as getaway characters. For example, if the data a.txt contains “AAA”, the script command ECHOFILEHEX a.txt would output “\x41\x41\x41”. This can be useful to echo binary data into printf or echo -e, in Linux holds at least.

Meanwhile, I had some difficulty reading the original code. You know, all of us have different programming styles. Don’t get me wrong, I’ve been understood to compose some messed-up spaghetti code. I sometimes search old jobs looking for some libs or classes I coded as well as question ‘who the heck composed this steaming stack of code?’ Me, it was me. Anyway, I started to modification a bit right here as well as there as well as ended up altering quite much the entire code. That’s the beauty as well as the curse of open-source. If you’re curious you can inspect it out here.

Kesimpulan

All in all, as well as in spite of some bumps, I’m rather delighted with Malduino. It is what I expected: an open platform for BadUSB attacks that’s in its infancy. It’s incredible that we can all tinker with it, customize it, make it much better or just make it fit our needs. I hope a genuine neighborhood can begin so we can see its full prospective emerge. My short listing includes simulating other USB devices, much better SD card management, as well as broadening the gadget via the unused pins. What would you add?

It’s a long method to go as well as a great deal can go wrong, so great luck with the job [Seytonic]!

Leave A Comment