Tylous / SourcePoint

SourcePoint is a C2 profile generator for Cobalt Strike command and control servers designed to ensure evasion.
1.01k stars 150 forks source link

Indexing error when setting PE_Name variable #14

Closed hsfetty closed 2 years ago

hsfetty commented 2 years ago

🐛 Summary

Line 93 of Loader/Loader.go uses PE[5] to reference the 5th element from the Beacon_Stage_p2 that is generated. 2/30 of the options in Struct/Struct.go do not have the image_size variables, so this line will reference the incorrect variable 1/15 times, or when specifying CyMemDef64.dll (27) or umppc.dll (30) as PE_Clone. The actual error is thrown on line 94 of Loader/Loader.go when printing the name after splitting by ".

To reproduce

  1. This error can be reproduced by running the code with -PE_Clone 27 or -PE_Clone 30

Any helpful log output or screenshots

[!] Host Staging Is Enabled - Staged Payloads Are Available But Your Beacon Payload Is Available To Anyone That Connects To Your Server To Request It
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/Tylous/SourcePoint/Loader.GenerateOptions({_, _}, {_, _}, {_, _}, {_, _}, {0x0, 0x0}, ...)
        /tools/SourcePoint/Loader/Loader.go:94 +0x993
main.main()
        /tools/SourcePoint/SourcePoint.go:252 +0xd11

Below is a screenshot of the error that is thrown:

image

Tylous commented 2 years ago

Fixed in v2.4