Malduino עלית – הופעות ראשונות מאוד

קצת בחזרה, חיברתי מאמר על Malduino, Arduino מבוסס, קוד פתוח Badusb התקן. גיליתי את העבודה מרתקת אז נרשמתי לגרסה עילית, כמו גם בטוח, כמו גם הדוור הידידותי הפיל אותו בתיבת הדואר שלי ביום שישי האחרון, כלומר אני צריך לשחק עם זה בסוף השבוע. עבור אלה שהחמיצו את המאמר, Malduino הוא גאדג ‘ט USB אשר מסוגל לחקות מקלדת כמו גם להזריק הקשות, בין היתר. כאשר במעטפת המתאימה, זה רק ייראה כמו כונן הבזק מסוג USB. זה כמו הדברים האלה שאתה רואה בסרטים שבהם בחור תקעים גאדג ‘ט, כמו גם זה אוטומטי hacks את המחשב. הוא אוניות בשתי גרסאות, לייט, כמו גם עלית, הן מבוססות על Atmega32U4.

גרסת Lite היא קטנה באמת, מלבד מחבר ה- USB הוא מכיל רק מתג, המאפשר לאדם לבחור בין ריצה כמו גם תכנות, כמו גם LED, אשר מציין כאשר התסריט השלימה פועל.

מקורי Malduino עלית סקיצה, כמו גם אב טיפוס לייט
גרסת האליטה גדולה יותר, כולל מבקר כרטיס מיקרו-ס.ק. וגם ארבעה מתגים לטבול, המאפשרים לאדם לבחור איזה סקריפט לרוץ מהכרטיס. כמו כן יש את הוביל, אשר מציין מתי סקריפט הושלם לרוץ. זה מאפשר לאדם לשפוך את הקושחה רק כאשר כמו גם תוכנית הקשות הזרקת סקריפטים אשר שמרו בכרטיס מיקרו-SD, בניגוד לגרסה לייט אשר צריך להבהב בכל פעם שאדם רוצה להפעיל סקריפט אחר.

אלה הם שני malduinos, כמו גם מאז הם מתוכנתים ישירות מתוך Arduino IDE, כל פונקציה שהזכרתי רק יכול להיות מתוכנת מחדש, מחדש purposed או ירד כל ביחד. אתה יכול לקנות אחד, כמו גם לבחור רק כדי לנצל אותו כמו Arduino ‘נורמלי’, אם כי אין הרבה סיכות לשחק עם. גמישות זו היתה אחת הדברים הראשונים מאוד שאהבתי עליו, כמו גם באמת הסיעו אותי לקחת חלק במסע מימון הקהל. נבדק על סקירה מלאה.

החומרה

מאלדינו עלית לעומת כונן הבזק מסוג USB – –
אז לוח האליטה הוצג כמו שגרתי, כמו גם גיליתי את עצמי הרבה זמן להסתכל על זה. למרות להיות ארוך יותר מאשר גרסה לייט, זה עדיין קטן למדי, מדידה על 4.6 ס”מ x 1.1 ס”מ (סביב 1.8 ב x 0.43 ב), אשר אתה יכול להסתגל במהירות במקרה ישן, אם כי תצטרך לחתוך קצת כמה חורים עבור מתגי DIP כמו גם את כרטיס מיקרו SD. במסע מימון הקהל, סקיצה המקורית היתה עבור גרסת מתג 3 לטבול עם זאת האליטה הסופית יש ארבעה, אשר גיליתי נחמד. חיברתי אותו למחשב ישן, לאחר שיקול דעת על איזו קושחה זה עשוי לספינה עם כמו גם מה זה יכול לעשות למחשב הנייד שלי, כמו גם בטוח מספיק הוביל אדום הופיע. כמו כן זה היה זה. שום דבר אחר.

לאחר ששיחק עם מתגים, כמו גם פעילות גופנית קצת RTFM, הבנתי כי הקושחה IT ספינות עם סביר להניח איזה סוג של Q.C. מבחן עבור המטבלים, מה שהופך את malduino פלט המספרים 1 עד 4 (למעשה הדמיה keypress 1 עד 4), תלוי בו מתגים מופעלים. עד כה כל כך טוב, זה עובד, כמו גם ראיתי לוחות PCB גרוע יותר מאשר זה. הלוח יש חורים עבור שישה סיכות, אשר לא עקבתי את הבקר מיקרו, כמו גם אני לא מבין מה הם.

ההגדרה

הגדרת הצרכים Malduino כי יש לך את IDE Arduino מותקן כמו גם עד כה. אתה תהיה דרישה לפתוח את מנהל הלוח, כמו גם להגדיר את לוחות Sparkfun מאז האליטה מתוכנת כמו “Sparkfun Pro מיקרו” ריצה ב 3.3 V כמו גם 8 MHz. אז אתה דרישה ללכת malduino Script ממיר אתר אשר משרת מספר מטרות:

זה מאפשר להמיר סקריפטים בין Lite כמו גם גירסאות עילית

זה מאפשר לך לבחור את שפת עיצוב המקלדת שלך

IT אוטומטי מייצרת את העבודה Arduino לך לייבא את IDE

עבור גרסת העילית, רק לייצר סקריפט פשוט או אפילו ריק להוריד את הפרויקט, שכן כאשר מבצע “נורמלי” אתה פשוט פלאש Malduino כאשר כמו גם לנצל את כרטיס מיקרו SD לאחסן סקריפטים חדשים.

הערה על מהבהב, אם אתה ניצול הפצה מבוססת דביאן אתה יכול לבוא על פני כמה בעיות כמו שעשיתי כמו גם לא להיות מסוגל להבהב את המכשיר. כמו הפרט על ההודעה הכי שימושית ביותר, המודם שלי מנהל מנסה לדבר עם Malduino לאחר כל איפוס, כמו גם מבולבל Avrdude למוות. הפתרון הוא להוסיף כללי UDEV ל “/etc/UDEV/RULD.D/77-MM-USB-DEVICE-BLACKLIST-Local.Rules”, Kudos ל [socrim]:

1.
2.
3.
4.
5.
6.
7.
8.
פעולה! = & Quot; הוסף | שנה & quot;, goto = & quot; mm_usb_device_blacklist_local_end & quot;
תת-מערכת! = & Quot; USB & quot;, goto = & quot; mm_usb_device_blacklist_local_end & quot;
ENV{DEVTYPE}!="usb_device", GOTO="mm_usb_device_blacklist_local_end"

ATTRS{idVendor}=="1b4f" ATTRS{idProduct}=="9204", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="1b4f" ATTRS{idProduct}=="9203", ENV{ID_MM_DEVICE_IGNORE}="1"

LABEL="mm_usb_device_blacklist_local_end"

התוכנה

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
להיכנס
DELAY 1000
STRING id
DELAY 1000
להיכנס

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.

סיכום

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 Reply

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