Skip to content

Conversation

@snakems
Copy link
Contributor

@snakems snakems commented Sep 25, 2017

No description provided.

Copy link
Contributor

@obilodeau obilodeau left a comment

Choose a reason for hiding this comment

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

Good feature! Please see my comments for small improvements.


def shortcut_function(fd):
""" Add shortcut function to the profile """
fd.write("""function Add-Shortcut{
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should extract that code in an external .ps1 file that we can inline at runtime. Add it in here: malboxes/scripts/windows/

Then you can replace shortcut_function(fd) with an open(...).read()

"shortcut": [
//Create shortcuts for exe files
{"dest": "$env:USERPROFILE\\Desktop\\Fiddler.lnk", "target": "$env:LOCALAPPDATA\\Programs\\Fiddler\\Fiddler.exe"},
{"dest": "$env:USERPROFILE\\Desktop\\Fiddler Port 9999.lnk", "target": "$env:LOCALAPPDATA\\Programs\\Fiddler\\Fiddler.exe", "arguments": "/port:9999"},
Copy link
Contributor

Choose a reason for hiding this comment

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

One of these exemples should be a desktop shortcut with the shorter syntax since you explicitly support it.

@pix
Copy link
Contributor

pix commented Sep 26, 2017

I think a .ps1 file generated with jinja would be even better, I'm playing with malboxes to build kali vm too, and, moving the profile code to a generated .ps1/.sh would simplify this code

@obilodeau obilodeau merged commit 18c630a into GoSecure:master Sep 27, 2017
@obilodeau
Copy link
Contributor

Thanks @snakems!

@pix, I think in this case this is clearly a function and we can include it and call it instead of generating a ton of code through jinja templates. That said, I'm looking forward to see what you come up with regarding building Linux boxes and we'll see what kind of generalization we can do 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.

3 participants