Skip to content

Commit d579675

Browse files
authored
Revert "Add SCCM Client Push Installation via cross‑protocol relay (SCCM)"
1 parent 18f14ac commit d579675

4 files changed

Lines changed: 4 additions & 347 deletions

File tree

examples/ntlmrelayx.py

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,7 @@ def start_servers(options, threads):
217217
c.setIsSCCMDPAttack(options.sccm_dp)
218218
c.setSCCMPoliciesOptions(options.sccm_policies_clientname, options.sccm_policies_sleep)
219219
c.setSCCMDPOptions(options.sccm_dp_extensions, options.sccm_dp_files)
220-
c.setIsSCCMClientPushAttack(options.sccm_clientpush)
221-
c.setSCCMClientPushOptions(options.sccm_clientpush_devicename, options.sccm_clientpush_site, options.sccm_clientpush_ip, options.sccm_clientpush_sleep)
222-
220+
223221
c.setAltName(options.altname)
224222

225223
#If the redirect option is set, configure the HTTP server to redirect targets to SMB
@@ -428,20 +426,11 @@ def stop_servers(threads):
428426
sccmpoliciesoptions.add_argument('--sccm-policies-clientname', action='store', required=False, help='The name of the client that will be registered in order to dump secret policies. Defaults to the relayed account\'s name')
429427
sccmpoliciesoptions.add_argument('--sccm-policies-sleep', action='store', required=False, help='The number of seconds to sleep after the client registration before requesting secret policies')
430428

431-
# SCCM distributions point options
432429
sccmdpoptions = parser.add_argument_group("SCCM Distribution Point attack options")
433430
sccmdpoptions.add_argument('--sccm-dp', action='store_true', required=False, help='Enable SCCM Distribution Point attack. Perform package file dump from an SCCM Distribution Point. Expects as target \'http://<DP>/sms_dp_smspkg$/Datalib\'')
434431
sccmdpoptions.add_argument('--sccm-dp-extensions', action='store', required=False, help='A custom list of extensions to look for when downloading files from the SCCM Distribution Point. If not provided, defaults to .ps1,.bat,.xml,.txt,.pfx')
435432
sccmdpoptions.add_argument('--sccm-dp-files', action='store', required=False, help='The path to a file containing a list of specific URLs to download from the Distribution Point, instead of downloading by extensions. Providing this argument will skip file indexing')
436433

437-
# SCCM client push options
438-
sccmclientpushoptions = parser.add_argument_group("SCCM Client Push attack options")
439-
sccmclientpushoptions.add_argument('--sccm-clientpush', action='store_true', required=False, help='Enable SCCM Client Push attack. Invokes SCCM client push by registering a fake device. Only works when relaying a machine account. Expects as target \'http://<MP>/ccm_system_windowsauth/request\'')
440-
sccmclientpushoptions.add_argument('--sccm-clientpush-devicename', action='store', required=False, help='The name of the fake client that will be registered in order to invoke automatic site-wide client push installation.')
441-
sccmclientpushoptions.add_argument('--sccm-clientpush-site', action='store', required=False, help='The target site to include in the SCCM Client Push DDR request.')
442-
sccmclientpushoptions.add_argument('--sccm-clientpush-ip', action='store', required=False, help='The IP address the Client Push Installation should connect to.')
443-
sccmclientpushoptions.add_argument('--sccm-clientpush-sleep', action='store', default=3, type=int, required=False, help='The number of seconds to sleep after the client registration before sending the DDR request')
444-
445434
try:
446435
options = parser.parse_args()
447436
except Exception as e:
@@ -464,21 +453,6 @@ def stop_servers(threads):
464453
logging.error(f"For instance: {urlparse(options.target).scheme}://{urlparse(options.target).netloc}/sms_dp_smspkg$/Datalib")
465454
sys.exit(1)
466455

467-
# Ensuring the correct parameters are set when performing SCCM Client Push attack
468-
if options.sccm_clientpush is True and not options.target.rstrip('/').endswith("/ccm_system_windowsauth/request"):
469-
logging.error("When performing SCCM Client Push attack, the Management Point authenticated device registration endpoint should be provided as target")
470-
logging.error(f"For instance: {urlparse(options.target).scheme}://{urlparse(options.target).netloc}/ccm_system_windowsauth/request")
471-
sys.exit(1)
472-
elif options.sccm_clientpush_devicename == None:
473-
logging.error(f"Error please specify a name for the device to be registered.")
474-
sys.exit(1)
475-
elif options.sccm_clientpush_site == None:
476-
logging.error(f"Error please specify a valid SCCM site.")
477-
sys.exit(1)
478-
elif options.sccm_clientpush_ip == None:
479-
logging.error(f"Error please specify an IP address to which Client Push Installation should be invoked to.")
480-
sys.exit(1)
481-
482456
# Init the example's logger theme
483457
logger.init(options.ts, options.debug)
484458

@@ -592,4 +566,4 @@ def stop_servers(threads):
592566
for s in threads:
593567
del s
594568

595-
sys.exit(0)
569+
sys.exit(0)

impacket/examples/ntlmrelayx/attacks/httpattack.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@
2121
from impacket.examples.ntlmrelayx.attacks.httpattacks.adcsattack import ADCSAttack
2222
from impacket.examples.ntlmrelayx.attacks.httpattacks.sccmpoliciesattack import SCCMPoliciesAttack
2323
from impacket.examples.ntlmrelayx.attacks.httpattacks.sccmdpattack import SCCMDPAttack
24-
from impacket.examples.ntlmrelayx.attacks.httpattacks.sccmclientpushattack import SCCMClientPushAttack
2524

2625

2726

2827
PROTOCOL_ATTACK_CLASS = "HTTPAttack"
2928

3029

31-
class HTTPAttack(ProtocolAttack, ADCSAttack, SCCMPoliciesAttack, SCCMDPAttack, SCCMClientPushAttack):
30+
class HTTPAttack(ProtocolAttack, ADCSAttack, SCCMPoliciesAttack, SCCMDPAttack):
3231
"""
3332
This is the default HTTP attack. This attack only dumps the root page, though
3433
you can add any complex attack below. self.client is an instance of urrlib.session
@@ -45,8 +44,6 @@ def run(self):
4544
SCCMPoliciesAttack._run(self)
4645
elif self.config.isSCCMDPAttack:
4746
SCCMDPAttack._run(self)
48-
elif self.config.isSCCMClientPushAttack:
49-
SCCMClientPushAttack._run(self)
5047
else:
5148
# Default action: Dump requested page to file, named username-targetname.html
5249
# You can also request any page on the server via self.client.session,
@@ -56,4 +53,4 @@ def run(self):
5653
r1 = self.client.getresponse()
5754
print(r1.status, r1.reason)
5855
data1 = r1.read()
59-
print(data1)
56+
print(data1)

0 commit comments

Comments
 (0)