forked from p15670423/monkey
Pass build
This commit is contained in:
parent
eaf0cc854f
commit
45fdf4b62c
|
@ -53,7 +53,9 @@ class ModifyShellStartupFiles(PBA):
|
||||||
def run(self):
|
def run(self):
|
||||||
if self.command:
|
if self.command:
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(self.command, stderr=subprocess.STDOUT, shell=True).decode()
|
output = subprocess.check_output(self.command, # noqa: DUO116
|
||||||
|
stderr=subprocess.STDOUT,
|
||||||
|
shell=True).decode()
|
||||||
return output, True
|
return output, True
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
# Return error output of the command
|
# Return error output of the command
|
||||||
|
|
|
@ -20,8 +20,8 @@ class T1156(AttackTechnique):
|
||||||
'ips': [{'$arrayElemAt': ['$data.ip', 0]}]},
|
'ips': [{'$arrayElemAt': ['$data.ip', 0]}]},
|
||||||
'result': '$data.result'}},
|
'result': '$data.result'}},
|
||||||
{'$unwind': '$result'},
|
{'$unwind': '$result'},
|
||||||
{'$match': {'$or': [{'result': {'$regex': '\.bash'}},
|
{'$match': {'$or': [{'result': {'$regex': '\.bash'}}, # noqa: W605
|
||||||
{'result': {'$regex': '\.profile'}}]}}]
|
{'result': {'$regex': '\.profile'}}]}}] # noqa: W605
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_report_data():
|
def get_report_data():
|
||||||
|
|
|
@ -20,7 +20,7 @@ class T1504(AttackTechnique):
|
||||||
'ips': [{'$arrayElemAt': ['$data.ip', 0]}]},
|
'ips': [{'$arrayElemAt': ['$data.ip', 0]}]},
|
||||||
'result': '$data.result'}},
|
'result': '$data.result'}},
|
||||||
{'$unwind': '$result'},
|
{'$unwind': '$result'},
|
||||||
{'$match': {'result': {'$regex': 'profile\.ps1'}}}]
|
{'$match': {'result': {'$regex': 'profile\.ps1'}}}] # noqa: W605
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_report_data():
|
def get_report_data():
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
from common.utils.attack_utils import ScanStatus
|
|
||||||
from monkey_island.cc.encryptor import encryptor
|
from monkey_island.cc.encryptor import encryptor
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue