Usage and information: https://redd.it/mcjj4s
- [WinHttpRequest.ahk]
<?php | |
class GoogleServices | |
{ | |
public function __construct() | |
{ | |
$this->SetVariables(); | |
$this->VerifyToken(); | |
} |
#Doesn't Even Have to Be A Conformant COM DLL To trigger the load. | |
# Sample DLL To inject here | |
# https://github.com/redcanaryco/atomic-red-team/tree/master/atomics/T1179 | |
$manifest = '<?xml version="1.0" encoding="UTF-16" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity type="win32" name="LiterallyDoesentMatter" version="6.6.6.0"/> <file name="Anyname.dll.anything"> <comClass description="Any Description HERE" clsid="{89565276-A714-4a43-91FE-EDACDCC0FFEE}" threadingModel="Both" progid="JustMakeSomethingUp"/> </file> </assembly>'; | |
$ax = new-object -Com "Microsoft.Windows.ActCtx" | |
$ax.ManifestText = $manifest; | |
$DWX = $ax.CreateObject("JustMakeSomethingUp"); |
| |
; Version: 2022.06.30.1 | |
; https://gist.github.com/49a60fb49402c2ebd4d9bc6db03813a1 | |
/* ;region Example | |
now := A_Now | |
junction := A_Desktop "\Junction." now | |
directory := A_Desktop "\Directory." now | |
FileCreateDir % directory | |
FileOpen(directory "\test.txt", 0x1).Write("Hello World!") |
Usage and information: https://redd.it/mcjj4s
#Requires AutoHotkey v2.0 | |
; Version: 2023.10.05.1 | |
; https://gist.github.com/7cce378c9dfdaf733cb3ca6df345b140 | |
GetUrl() { ; Active Window Only | |
static S_OK := 0, TreeScope_Descendants := 4, UIA_ControlTypePropertyId := 30003, UIA_DocumentControlTypeId := 50030, UIA_EditControlTypeId := 50004, UIA_ValueValuePropertyId := 30045 | |
hWnd := WinGetID("A") | |
IUIAutomation := ComObject("{FF48DBA4-60EF-4201-AA87-54103EEF594E}", "{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}") | |
eRoot := ComValue(13, 0) |
#Requires AutoHotkey v2.0 | |
; Version: 2023.09.22.1 | |
; https://gist.github.com/58d2b141be2608a2f7d03a982e552a71 | |
; Private | |
Acc_Init(Function) { | |
static hModule := DllCall("LoadLibrary", "Str", "oleacc.dll", "Ptr") | |
return DllCall("GetProcAddress", "Ptr", hModule, "AStr", Function, "Ptr") | |
} |
| |
; Version: 2023.05.17.1 | |
; https://gist.github.com/cd70e009792fc2eb866f9f5caf1e395a | |
/* | |
Message.Listen(Callback) ; Listen | |
Message.Listen() ; Stop listening | |
Message.Send(Message, Target[, Timeout := 7000ms]) | |
ErrorLevel | |
-1 = Target not found |
| |
; Version: 2022.07.01.1 | |
; Usages and examples: https://redd.it/qplxwo | |
Alert(Options := 0, Title := "", Message := "", Spec := "") | |
{ | |
if !(Options ~= "i)^(0x)?\d+") { | |
Message := Options | |
Options := Title := Spec := "" | |
} |
UIA is the way around UIPI ([User Interface Privilege Isolation][1]) which in simple terms is a way of bypassing the security built into Windows to avoid applications interacting with other applications that have a higher integrity level (security).
In other words, when you run a script it cannot communicate with the system or elevated (running as Administrator) processes; this is to avoid insecure and non-sanctioned interactions.
/* | |
Append two ranges horizontally. | |
Inputs: | |
- range1: the first range | |
- range2: the second range | |
- default: the value entered into missing rows. | |
Return: The merged ranges, with empty rows filled with the default value. Missing | |
value within either of the two ranges filled with zeros (0). The number of rows |