mirror of
https://github.com/Pennyw0rth/NetExec
synced 2026-06-06 16:34:30 +00:00
[winrm] platform check when doing kerberos auth
Signed-off-by: XiaoliChan <2209553467@qq.com>
This commit is contained in:
+16
-1
@@ -5,6 +5,7 @@ import requests
|
||||
import urllib3
|
||||
import tempfile
|
||||
import contextlib
|
||||
import platform
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from io import StringIO
|
||||
@@ -43,6 +44,20 @@ class winrm(connection):
|
||||
|
||||
connection.__init__(self, args, db, host)
|
||||
|
||||
def proto_flow(self):
|
||||
if self.kerberos and (platform.system() != "Linux"):
|
||||
self.logger.info("Doing kerberos auth with WINRM only support Linux platform!")
|
||||
return False
|
||||
self.proto_logger()
|
||||
if self.create_conn_obj():
|
||||
self.enum_host_info()
|
||||
self.print_host_info()
|
||||
if self.login():
|
||||
if hasattr(self.args, "module") and self.args.module:
|
||||
self.call_modules()
|
||||
else:
|
||||
self.call_cmd_args()
|
||||
|
||||
def proto_logger(self):
|
||||
self.logger = NXCAdapter(
|
||||
extra={
|
||||
@@ -496,4 +511,4 @@ class winrm(connection):
|
||||
perSecretCallback=lambda secret_type, secret: self.logger.highlight(secret),
|
||||
)
|
||||
LSA.dumpCachedHashes()
|
||||
LSA.dumpSecrets()
|
||||
LSA.dumpSecrets()
|
||||
Reference in New Issue
Block a user