Merge pull request #1128 from leesoh/remove-http-defaults

Remove listener default value for Port
dev
Chris Ross 2018-06-05 11:55:58 -04:00 committed by GitHub
commit 23a3fba5b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 22 deletions

View File

@ -50,7 +50,7 @@ class Listener:
'Host' : {
'Description' : 'Hostname/IP for staging.',
'Required' : True,
'Value' : "http://%s:%s" % (helpers.lhost(), 80)
'Value' : "http://%s" % (helpers.lhost())
},
'BindIP' : {
'Description' : 'The IP to bind to on the control server.',
@ -60,7 +60,7 @@ class Listener:
'Port' : {
'Description' : 'Port for the listener.',
'Required' : True,
'Value' : 80
'Value' : ''
},
'Launcher' : {
'Description' : 'Launcher string.',
@ -393,7 +393,7 @@ class Listener:
b64RoutingPacket = base64.b64encode(routingPacket)
stager += "$ser="+helpers.obfuscate_call_home_address(host)+";$t='"+stage0+"';"
#Add custom headers if any
if customHeaders != []:
for header in customHeaders:

View File

@ -48,7 +48,7 @@ class Listener:
'Host' : {
'Description' : 'Hostname/IP for staging.',
'Required' : True,
'Value' : "http://%s:%s" % (helpers.lhost(), 80)
'Value' : "http://%s" % (helpers.lhost())
},
'BindIP' : {
'Description' : 'The IP to bind to on the control server.',
@ -58,7 +58,7 @@ class Listener:
'Port' : {
'Description' : 'Port for the listener.',
'Required' : True,
'Value' : 80
'Value' : ''
},
'Launcher' : {
'Description' : 'Launcher string.',

View File

@ -38,12 +38,12 @@ class Listener:
'Host' : {
'Description' : 'Hostname/IP for staging.',
'Required' : True,
'Value' : "http://%s:%s" % (helpers.lhost(), 80)
'Value' : "http://%s" % (helpers.lhost())
},
'Port' : {
'Description' : 'Port for the listener.',
'Required' : True,
'Value' : 80
'Value' : ''
},
'Launcher' : {
'Description' : 'Launcher string.',

View File

@ -60,7 +60,7 @@ class Listener:
'Port' : {
'Description' : 'Port for the listener.',
'Required' : True,
'Value' : 80
'Value' : ''
},
'DefaultProfile' : {
'Description' : 'Default communication profile for the agent, extracted from RedirectListener automatically.',
@ -293,7 +293,7 @@ class Listener:
# add the RC4 packet to a cookie
launcherBase += "o.addheaders=[('User-Agent',UA), (\"Cookie\", \"session=%s\")];\n" % (b64RoutingPacket)
#install proxy and creds globally, so they can be used with urlopen.
launcherBase += "urllib2.install_opener(o);\n"

View File

@ -46,7 +46,7 @@ class Listener:
'Host' : {
'Description' : 'Hostname/IP for staging.',
'Required' : True,
'Value' : "http://%s:%s" % (helpers.lhost(), 80)
'Value' : "http://%s" % (helpers.lhost())
},
'BindIP' : {
'Description' : 'The IP to bind to on the control server.',
@ -56,7 +56,7 @@ class Listener:
'Port' : {
'Description' : 'Port for the listener.',
'Required' : True,
'Value' : 80
'Value' : ''
},
'StagingKey' : {
'Description' : 'Staging key for initial agent negotiation.',

View File

@ -31,12 +31,12 @@ class Listener:
'Host' : {
'Description' : 'Hostname/IP for staging.',
'Required' : True,
'Value' : "http://%s:%s" % (helpers.lhost(), 80)
'Value' : "http://%s" % (helpers.lhost())
},
'Port' : {
'Description' : 'Port for the listener.',
'Required' : True,
'Value' : 80
'Value' : ''
}
}
@ -73,7 +73,7 @@ class Listener:
if not language or language.lower() != 'powershell':
print helpers.color('[!] listeners/http generate_launcher(): only PowerShell is supported at this time')
return None
if listenerName and (listenerName in self.mainMenu.listeners.activeListeners):
# extract the set options for this instantiated listener
@ -93,7 +93,7 @@ class Listener:
msfPayload = 'windows/meterpreter/reverse_http'
if 'https' in host:
msfPayload += 's'
if 'http' in host:
parts = host.split(':')
host = parts[1].strip('/')

View File

@ -39,7 +39,7 @@ class Listener:
'Host' : {
'Description' : 'Hostname/IP for staging.',
'Required' : True,
'Value' : "http://%s:%s" % (helpers.lhost(), 80)
'Value' : "http://%s" % (helpers.lhost())
},
'BindIP' : {
'Description' : 'The IP to bind to on the control server.',
@ -49,7 +49,7 @@ class Listener:
'Port' : {
'Description' : 'Port for the listener.',
'Required' : True,
'Value' : 80
'Value' : ''
},
'Launcher' : {
'Description' : 'Launcher string.',
@ -138,7 +138,7 @@ class Listener:
self.threads = {} # used to keep track of any threaded instances of this server
# optional/specific for this module
# set the default staging key to the controller db default
self.options['StagingKey']['Value'] = str(helpers.get_config('staging_key')[0])
@ -174,7 +174,7 @@ class Listener:
if not language:
print helpers.color('[!] listeners/template generate_launcher(): no language specified!')
return None
if listenerName and (listenerName in self.mainMenu.listeners.activeListeners):
# extract the set options for this instantiated listener
@ -223,18 +223,18 @@ class Listener:
"""
Generate just the agent communication code block needed for communications with this listener.
This is so agents can easily be dynamically updated for the new listener.
This should be implemented for the module.
"""
if language:
if language.lower() == 'powershell':
updateServers = """
$Script:ControlServers = @("%s");
$Script:ServerIndex = 0;
""" % (listenerOptions['Host']['Value'])
getTask = """
$script:GetTask = {