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

New Module: Sharpcradle - Execute .NET assembly from URL in memory #112

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

hackabean
Copy link
Contributor

@hackabean hackabean commented Oct 1, 2019

  • Added sharpcradle

Description and screenshoot:

image

Also finding a reliable way to parse the arguments might be important as some of those tools require quite a range of syntax(es) that ST might struggle to comprehend.

@hackabean hackabean changed the title [New Module] Sharpcradle - Execute .NET assembly from URL in memory New Module: Sharpcradle - Execute .NET assembly from URL in memory Oct 1, 2019
@byt3bl33d3r
Copy link
Owner

byt3bl33d3r commented Oct 2, 2019

@hackabean so since this is essentially 2/4 of what the execute-assembly module does, wouldn't it be better if we just added a URL parameter to that module instead of a completely new one?

@hackabean
Copy link
Contributor Author

hackabean commented Oct 2, 2019

@byt3bl33d3r
Oh yeah, I am happy to merge it with your module and add URL as an option. Leave it up to me and I will come back to you.

Are you happy to change the naming to execute-assembly as local-assembly and sharpcradle as remote-assembly in one module execute-assembly ?

@byt3bl33d3r
Copy link
Owner

@hackabean yeah that's perfect, that would be awesome. Thanks!

@hackabean
Copy link
Contributor Author

hackabean commented Oct 3, 2019

@byt3bl33d3r

  • Execute-assembly V2
    Intro:
    image
  1. Added execute local-assembly (original execute-assembly with minor changes - fixes [BUG] Module boo/execute-assembly BCE0048: Type 'System.Type' does not support slicing #104)

image

  1. Added execute remote-assembly (known as sharpcradle)

image

Since both of those use the same arguments structure I did not need to add another option.

  1. Added execute remote-project to load *.xml and *.csproj files as a bonus.
    Stager connection via xml:

image

Does not support arguments as it is a project. Don't know if I need to make it explicit.

Question:
Say you would like to port LaZagne to work with ST what is the best way to do it ? I am struggling to find an answer and would love to do it!

'Assembly': {
'Description' : 'Path to assembly',
'Local-Assembly': {
'Description' : 'Path to local assembly',
'Required' : True,
'Value' : ''
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hackabean seems like the tests are failing because there isn't a default value here. Can you take a look at the module tests and set it manually through there?
Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@byt3bl33d3r I added default values and still nothing. Teamserver is loading modules without any errors.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hackabean no worries, i'll take a look later today.
Cheers

@@ -65,12 +65,12 @@ def payload(self):
elif self.options['Remote-Assemebly']['Value']:
with open('core/teamserver/modules/boo/src/remote-assembly.boo', 'r') as module_src:
src = module_src.read()
src = src.replace('BINARY', str(self.options['RemoteAssemebly']['Value']))
src = src.replace('BINARY', str(self.options['Remote-Assemebly']['Value']))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assembly* - got an extraneous "e" there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants