MCPcopy
hub / github.com/Pennyw0rth/NetExec / on_admin_login

Method on_admin_login

nxc/modules/masky.py:38–70  ·  view source on GitHub ↗
(self, context, connection)

Source from the content-addressed store, hash-verified

36 self.file_args = True
37
38 def on_admin_login(self, context, connection):
39 if not self.ca:
40 context.log.fail(r"Please provide a valid CA server and CA name (CA_SERVER\CA_NAME)")
41 return False
42
43 host = connection.host
44 domain = connection.domain
45 username = connection.username
46 kerberos = connection.kerberos
47 password = getattr(connection, "password", "")
48 lmhash = getattr(connection, "lmhash", "")
49 nthash = getattr(connection, "nthash", "")
50
51 m = Masky(
52 ca=self.ca,
53 template=self.template,
54 user=username,
55 dc_ip=self.dc_ip,
56 domain=domain,
57 password=password,
58 hashes=f"{lmhash}:{nthash}",
59 kerberos=kerberos,
60 exe_path=self.agent_exe,
61 file_args=self.file_args,
62 )
63
64 context.log.display("Running Masky on the targeted host")
65 rslts = m.run(host)
66 tracker = m.get_last_tracker()
67
68 self.process_results(connection, context, rslts, tracker)
69
70 return self.process_errors(context, tracker)
71
72 def process_results(self, connection, context, rslts, tracker):
73 if not tracker.nb_hijacked_users:

Callers

nothing calls this directly

Calls 5

process_resultsMethod · 0.95
process_errorsMethod · 0.95
failMethod · 0.80
displayMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected