inf0secrabbit / badassmacros Goto Github PK
View Code? Open in Web Editor NEWBadAssMacros - C# based automated Malicous Macro Generator.
BadAssMacros - C# based automated Malicous Macro Generator.
Hi guys,
Just wanted to post this here in case anyone was wondering how to add x64 support. Essentially, you should replace all x86 "Long" pointer types with "LongPtr" types. This vbtype will automatically select the "Long" for x86 and "LongLong" for x64. Do not just blindly replace Long, but look at the Win32 API specification and convert types appropriately. If a Win32 API parameter or result is not a pointer, it should not be converted to "LongLong" and therefore "LongPtr" should not be used.
The following example could help: https://gist.github.com/rmdavy/43ce9872080a2a37fe54a10a6d9b0f1c
Also take into consideration the following from Sevagas' blog on MacroPack Pro https://blog.sevagas.com/Launch-shellcodes-and-bypass-Antivirus-using-MacroPack-Pro-VBA-payloads :
Dim allocatedAddr As LongPtr ' Long or LongLong depending on architecture
#If Win64 Then
allocatedAddr = IndirectWin32Call("kernel32", "VirtualAlloc", vbLongLong, 0&, UBound(buffToInject), &H1000, &H40) ' vbLongLong is mandatory as returned address is 64bit
...
Dim nullValue as LongPtr ' Or instead use 0^ for LongLong zero directly as function argument
nullValue = 0
result = IndirectWin32Call("kernel32", "CreateThread", vbLong, nullValue, nullValue, allocatedAddr, nullValue, 0, nullValue) 'DispCallFunc needs precise type for arguments. LongLong zero is not the same as Long zero.
This information helped me a lot for x64 Shellcode injection. I hope this makes it less time-consuming for other people in the future.
The generated vba macro is very long, the error is too many line continuation , not able to manually add the macro in the doc file.
It seems kind of old.. Is it only possible to deploy shell code or also custom powershell code?
It could be very useful to add an option to specify the type of macro that needs to be generated (either x86
or x64
) that would help avoiding tons of issues and be a time saver! ๐๐ผ
Great work there. Would you be able to advise, how to resolve "Too many line continuations" error in the Macrs VBA app? new to vba and trying to understand this ;) student so be gentle on me hehehe
Hi @Inf0secRabbit - Just to let you know that I integrated BAM
(which I find very useful despite the known open issues) with Invoke-Vulcan. Please do not hesitate to take a look and leave your feedback.
There are guys out there who don't have Windows as main OS, and would like to download the pre-compiled version :)
Please let me know if you add the .exe
(Great project though)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.