Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Py3 12 deprecations #448

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Py3 12 deprecations #448

wants to merge 8 commits into from

Conversation

doomedraven
Copy link
Collaborator

No description provided.

".*\\\\Microsoft\\ Security\\ Client",
".*\\\\System32\\\\drivers\\\\kl1\\.sys$",
".*\\\\System32\\\\drivers\\\\(tm((actmon|comm)\\.|e(vtmgr\\.|ext\\.)|(nciesc|tdi)\\.)|TMEBC32\\.)sys$",
r".*\\AVAST\\ Software",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be

r".*\\AVAST\ Software",

right? (Changing \\\\ to \\ and also changing \\ to \ )

If so that also applies to many of the other changes in this PR.
image

r"Browsers\\Autofills\\Autofills_Google\.txt",
r"Browsers\\Downloads\\Downloads_Google\.txt",
r"Browsers\\History\\History_Google\.txt",
r"Browsers\\Passwords\\Passwords_Edge\.txt",
Copy link

@rkoumis rkoumis Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly these do not need the backslash before the .txt suffix. But I could be wrong

r".*\\FlashFXP\\.*\\Quick\.dat$",
r".*\\FileZilla\\sitemanager\.xml$",
r".*\\FileZilla\\recentservers\.xml$",
r".*\\FTPRush\\RushSite\.xml$",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here also it seems to me the backslash before the period may not be needed

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here also it seems to me the backslash before the period may not be needed

Although I am having second thoughts about that

r".*\\Skype\\.*\\config\.xml$",
r".*\\Tencent\\ Files\\.*\\QQ\\Registry\.db$",
r".*\\Trillian\\users\\global\\accounts\.ini$",
r".*\\Xfire\\XfireUser\.ini$",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, do we need the backslash before .ini or .txt etc ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, do we need the backslash before .ini or .txt etc ?

Probably we do need it here I think now

]
indicators = (
r"HKEY_CURRENT_USER\\\\Software\\\\Medusa",
r"HKEY_CURRENT_USER\\\\Software\\\\Medusa\\\\.*",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these two should be

  r"HKEY_CURRENT_USER\\Software\\Medusa",
  r"HKEY_CURRENT_USER\\Software\\Medusa\\.*",

@@ -66,7 +66,7 @@ def __init__(self, *args, **kwargs):
def on_call(self, call, process):
if call["api"] == "RegSetValueExA":
key = self.get_argument(call, "FullName").lower()
if ".*\\software\\classes\\exefile\\shell\\open\\command.*" in key:
if r".*\\software\classes\\exefile\\shell\\open\\command.*" in key:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look like a regular expression, just is being used with in - so it should be if r"\software\classes\exefile\shell\open\command" in key: - right?

@@ -60,7 +60,7 @@ class WebShellFiles(Signature):
ttps += ["T1505.003"] # MITRE v7,8

def run(self):
indicators = [".*\\\\inetpub\\\\wwwroot\\\\.*", ".*\\\\System32\\\\inetsrv\\\\.*"]
indicators = [r".*\inetpub\wwwroot\.*", ".*\System32\inetsrv\.*"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should say

  indicators = (r".*\\inetpub\\wwwroot\\.*", r".*\\System32\\inetsrv\\.*")

@@ -83,7 +83,7 @@ class OWAWebShellFiles(Signature):

def run(self):
indicators = [
"C:\\\\Program Files\\\\Microsoft\\\\Exchange Server\\\\V[0-9]{2}\\\\FrontEnd\\\\HttpProxy\\\\owa\\\\.*",
r"C:\\Program Files\Microsoft\Exchange Server\V[0-9]{2}\FrontEnd\HttpProxy\owa\.*",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should say

r"C:\\Program Files\\Microsoft\\Exchange Server\\V[0-9]{2}\\FrontEnd\\HttpProxy\\owa\\.*"

re.compile(r"[A-Za-z]:\\Windows\\Microsoft\.NET\\Framework\\v.*\\InstallUtil\.exe", re.IGNORECASE),
re.compile(r"[A-Za-z]:\\Windows\\Microsoft\.NET\\Framework\\v.*\\mscorsvw\.exe", re.IGNORECASE),
re.compile(r"[A-Z]:\\Windows\\Microsoft\.NET\\Framework\\v.*\\CasPol\.exe", re.IGNORECASE),
re.compile(r"[A-Z]:\\Windows\\Microsoft\.NET\\Framework\\v.*\\MSBuild\.exe", re.IGNORECASE),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you maybe got rid of too many \\\\ on this MSBuild line

@@ -132,8 +132,8 @@ def run(self):
return ret


GENERIC_CMD = '"c:\\windows\\system32\\cmd.exe" /c start /wait "" '
SUBSEQUENT_GENERIC_CMD = "c:\\windows\\system32\\cmd.exe /k "
GENERIC_CMD = r'"c:\\windows\system32\cmd.exe" /c start /wait "" '
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GENERIC_CMD ought to start with c:\windows I imagine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants