Hacking Articles Tips Tricks Videos Tutorials
467 subscribers
65.7K photos
15 videos
157 files
132K links
Exploit
Pentesting
Hacking
Red Team
Blue Team
Kali Linux
Bug Bounty
Black Hat
Cyber security etc

@Hacking_Video
@Hacking_attack
Download Telegram
Broken Access Control

Broken Access Control vulnerabilities are common in modern applications since the design and implementation of access control mechanisms…Continue reading on Medium »
Read more...
Hacking Articles Tips Tricks Videos Tutorials
Photo
Kali Linux Tutorials
OffensiveVBA : Code Execution And AV Evasion Methods For Macros In Office Documents

OffensiveVBA, In preparation for a VBS AV Evasion Stream/Video I was doing some research for Office Macro code execution methods and evasion techniques.

The list got longer and longer and I found no central place for offensive VBA templates – so this repo can be used for such. It is very far away from being complete. If you know any other cool technique or useful template feel free to contribute and create a pull request!

Most of the templates in this repo were already published somewhere. I just copy pasted most templates from ms-docs sites, blog posts or from other tools. Templates in this repoFileDescriptionShellApplication_ShellExecute.vbaExecute an OS command via ShellApplication object and ShellExecute methodShellApplication_ShellExecute_privileged.vbaExecute an privileged OS command via ShellApplication object and ShellExecute method – UAC promptShellcode_CreateThread.vbaExecute shellcode in the current process via Win32 CreateThreadShellcode_EnumChildWindowsCallback.vbaExecute shellcode in the current process via EnumChildWindowsWin32_CreateProcess.vbaCreate a new process for code execution via Win32 CreateProcess functionWin32_ShellExecute.vbaCreate a new process for code execution via Win32 ShellExecute functionWMI_Process_Create.vbaCreate a new process via WMI for code executionWMI_Process_Create2.vbaAnother WMI code execution exampleWscriptShell_Exec.vbaExecute an OS command via WscriptShell object and Exec methodWscriptShell_run.vbaExecute an OS command via WscriptShell object and Run methodVBA-RunPE@itm4n’s RunPE technique in VBAGadgetToJScriptmed0x2e’s C# script for generating .NET serialized gadgets that can trigger .NET assembly load/execution when deserialized using BinaryFormatter from JS/VBS/VBA based scripts.PPID_Spoof.vbachristophetd’s spoofing-office-macro copyAMSIBypass_AmsiScanBuffer_ordinal.vbarmdavy’s AMSI Bypass to patch AmsiScanBuffer using ordinal values for a signature bypassAMSIBypass_AmsiScanBuffer_Classic.vbarasta-mouse’s classic AmsiScanBuffer patchAMSIBypass_Heap.vbarmdavy’s HeapsOfFun repo copyAMSIbypasses.vbaoutflanknl’s AMSI bypass blogCOMHijack_DLL_Load.vbaLoad DLL via COM HijackingCOM_Process_create.vbaCreate process via COM objectDownload_Autostart.vbaDownload a file from a remote webserver and put it into the StartUp folderDownload_Autostart_WinAPI.vbaDownload a file from a remote webserver via URLDownloadtoFileA and put it into the StartUp folderDropper_Autostart.vbaDrop batch file into the StartUp folderRegistry_Persist_wmi.vbaCreate StartUp registry key for persistence via WMIRegistry_Persist_wscript.vbaCreate StartUp registry key for persistence via wscript objectScheduledTask_Create.vbaCreate and start sheduled task for code execution/persistenceXMLDOM_Load_XSL_Process_create.vbaLoad XSL from a remote webserver to execute coderegsvr32_sct_DownloadExecute.vbaExecute regsvr32 to download a remote webservers SCT file for code executionBlockETW.vbaPatch EtwEventWrite in ntdll.dll to block ETW data collectionBlockETW_COMPLUS_ETWEnabled_ENV.vbaBlock ETW data collection by setting the environment variable COMPLUS_ETWEnabled to 0, credit to @xpnShellWindows_Process_create.vbaShellWindows Process create to get explorer.exe as parent processAES.vbaAn example to use AES encryption/decryption in VBA from HereDropper_Executable_Autostart.vbaGet executable bytes from VBA and drop into Autostart – no download in this caseMarauderDrop.vbaDrop a COM registered .NET DLL into temp, import the function and execute code – in this case loads a remote C# binary from a webserver to memory and executes it – credit to @Jean_Maes_1994 for MaraudersMapDropper_Workfolders_lolbas_Execute.vbaDrop an embedded executable into the TEMP directory and execute it using C:\windows\system32\Workfolders.exe as LOLBAS – credit to @YoSignalsSandBoxEvasionSome SandBox Evasion templatesE[...]

___________________________
@hacking_Attack
@Hacking_Video