Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package proposal: runsc.vm #181

Open
edygert opened this issue Dec 12, 2022 · 11 comments
Open

Package proposal: runsc.vm #181

edygert opened this issue Dec 12, 2022 · 11 comments
Labels
🌀 FLARE-VM A package or feature to be used by FLARE-VM ❔ discussion Further discussion is needed 🆕 package New package request/idea/PR

Comments

@edygert
Copy link

edygert commented Dec 12, 2022

Package Name

runsc

Tool Name

runsc32.exe and runsc64.exe

Package type

ZIP_EXE

Tool's version number

1.0.0

Category

Utilities

Tool's authors

Evan H. Dygert

Tool's description

Makes running shellcode in a debugger easy.

Download URL

https://github.com/edygert/runsc/releases/download/V1.0.0/runsc.zip

Download SHA256 Hash

b50e03866c4830290384905c185b2ee876463f3dea15c8c751f0d12cf26fe7b5

Why is this tool a good addition?

Running shellcode in a debugger can be tricky. runsc32/runsc64 starts the shellcode in a suspended state, giving the analyst time to attach to the process with a debugger and then resume the shellcode.

@edygert edygert added the 🆕 package New package request/idea/PR label Dec 12, 2022
@edygert
Copy link
Author

edygert commented Dec 12, 2022

The zip file contains two executables, one for 32 and the other for 64 bit shellcode. The files can either be in the PATH or specified using the full path and filename.

@Ana06
Copy link
Member

Ana06 commented Oct 6, 2023

We have already shellcode_launcher, which can be used:

  • with the -bp option to raise a breakpoint and attach using the JIT debugger
  • patching the first bytes by EBFE, allowing to attach to the created process

But it is not exactly like running the shellcode in suspended state.

@edygert do you still think we need runsc?

@Ana06 Ana06 added the 🌀 FLARE-VM A package or feature to be used by FLARE-VM label Oct 6, 2023
@Ana06
Copy link
Member

Ana06 commented Oct 6, 2023

Related #181 do we need to add both?

@edygert
Copy link
Author

edygert commented Oct 6, 2023

The ability for runsc32/runsc64 to launch the shellcode in a suspended state makes it easier to use than shellcode_launcher (IMO) so I would include both. ShellcodeExec, however does not provide any new functionality not provided by runsc*/shellcode_launcher.

@edygert
Copy link
Author

edygert commented Oct 6, 2023

runsc* has another feature that is important for shellcode that expects the address of the shellcode to be on the stack. runsc* does this automatically.

@Ana06
Copy link
Member

Ana06 commented Feb 2, 2024

@edygert I think sclauncher in #886 adds the functionality you are describing here in addition to create PE files from shellcode. What do you think about adding that tool instead?

@edygert
Copy link
Author

edygert commented Feb 12, 2024

There are some important differences between sclauncher and runsc that make the tools complimentary. sclauncher creates PE files, runsc does not. runsc loads documents that the shellcode relies on, sclauncher does not. I plan on add the PE file creation feature to runsc so it will be one stop shopping. So I recommend keeping both.

@Ana06
Copy link
Member

Ana06 commented Jul 17, 2024

@jstrosch what is your opinion on this? I tend to think that sclauncher and runsc are similar enough to only need one. We could add both to VM-Packages to allow people to easily decide which one to install, but we would still need a default in FLARE-VM (at the moment that's sclauncher)

@Ana06 Ana06 added the ❔ discussion Further discussion is needed label Jul 17, 2024
@edygert
Copy link
Author

edygert commented Jul 17, 2024

They are both small so why not both?

@jstrosch
Copy link

I'm actually working on adding the ability to load additional content into memory - for example, this shellcode (https://github.com/jstrosch/malware-samples/tree/master/malware_analysis_exercises/2022/October) uses an egg hunter technique to find the next stage in the maldoc. So loading that document along with the shellcode would be quite helpful. I think the PE option is one of the most helpful features, so I would still advocate for a shellcode utility that does that to be the default (so sclauncher). Outside of that, they appear to offer similar capabilities. I'd say add them both if that is not an issue - I know the VM get's large and every little tool adds to the overall size though.

@jstrosch
Copy link

@Ana06 fwiw - updated sclauncher to include the ability to load additional content and made new releases on the project page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌀 FLARE-VM A package or feature to be used by FLARE-VM ❔ discussion Further discussion is needed 🆕 package New package request/idea/PR
Projects
None yet
Development

No branches or pull requests

3 participants