Skip to content

Commit 24ad5e6

Browse files
committed
Readd old coercion modules for deprecation warning
1 parent 2ac0d4d commit 24ad5e6

4 files changed

Lines changed: 83 additions & 0 deletions

File tree

nxc/modules/dfscoerce.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class NXCModule:
2+
name = "dfscoerce"
3+
description = "[DEPRECATED] Module to check if the DC is vulnerable to DFSCoerce, credit to @filip_dragovic/@Wh04m1001 and @topotam"
4+
supported_protocols = ["smb"]
5+
opsec_safe = True
6+
multiple_hosts = True
7+
8+
def __init__(self, context=None, module_options=None):
9+
self.context = context
10+
self.module_options = module_options
11+
self.listener = None
12+
13+
def options(self, context, module_options):
14+
"""LISTENER Listener Address (defaults to 127.0.0.1)"""
15+
self.listener = "127.0.0.1"
16+
if "LISTENER" in module_options:
17+
self.listener = module_options["LISTENER"]
18+
19+
def on_login(self, context, connection):
20+
context.log.fail('[DEPRECATED] This module moved to the new module "coerce_plus"')

nxc/modules/petitpotam.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
class NXCModule:
2+
name = "petitpotam"
3+
description = "[DEPRECATED] Module to check if the DC is vulnerable to PetitPotam, credit to @topotam"
4+
supported_protocols = ["smb"]
5+
opsec_safe = True
6+
multiple_hosts = True
7+
8+
def options(self, context, module_options):
9+
"""
10+
LISTENER IP of your listener
11+
PIPE Default PIPE (default: lsarpc)
12+
"""
13+
self.listener = "127.0.0.1"
14+
if "LISTENER" in module_options:
15+
self.listener = module_options["LISTENER"]
16+
self.pipe = "lsarpc"
17+
if "PIPE" in module_options:
18+
self.pipe = module_options["PIPE"]
19+
20+
def on_login(self, context, connection):
21+
context.log.fail('[DEPRECATED] This module moved to the new module "coerce_plus"')

nxc/modules/printerbug.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class NXCModule:
2+
name = "printerbug"
3+
description = "[DEPRECATED] Module to check if the Target is vulnerable to PrinterBug. Set LISTENER IP for coercion."
4+
supported_protocols = ["smb"]
5+
opsec_safe = True
6+
multiple_hosts = True
7+
8+
def __init__(self, context=None, module_options=None):
9+
self.context = context
10+
self.module_options = module_options
11+
self.listener = None
12+
13+
def options(self, context, module_options):
14+
"""LISTENER Listener Address (defaults to 127.0.0.1)"""
15+
self.listener = "127.0.0.1"
16+
if "LISTENER" in module_options:
17+
self.listener = module_options["LISTENER"]
18+
19+
def on_login(self, context, connection):
20+
context.log.fail('[DEPRECATED] This module moved to the new module "coerce_plus"')

nxc/modules/shadowcoerce.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
class NXCModule:
2+
name = "shadowcoerce"
3+
description = "[DEPRECATED] Module to check if the target is vulnerable to ShadowCoerce, credit to @Shutdown and @topotam"
4+
supported_protocols = ["smb"]
5+
opsec_safe = True
6+
multiple_hosts = True
7+
8+
def options(self, context, module_options):
9+
"""
10+
IPSC Use IsPathShadowCopied (default: False). ex. IPSC=true
11+
LISTENER Listener IP address (default: 127.0.0.1)
12+
"""
13+
self.ipsc = False
14+
self.listener = "127.0.0.1"
15+
if "LISTENER" in module_options:
16+
self.listener = module_options["LISTENER"]
17+
if "IPSC" in module_options:
18+
# Any string that's not empty can be casted to bool True
19+
self.ipsc = bool(module_options["IPSC"])
20+
21+
def on_login(self, context, connection):
22+
context.log.fail('[DEPRECATED] This module moved to the new module "coerce_plus"')

0 commit comments

Comments
 (0)