PowerShellSnippets
incidentresponse | PowerShellSnippets | |
---|---|---|
6 | 8 | |
24 | 54 | |
- | - | |
0.0 | 4.9 | |
about 1 year ago | over 2 years ago | |
PowerShell | PowerShell | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
incidentresponse
-
So how exactly is Log4j supposed to be patched/mitigated on Windows?
Use https://github.com/sp4ir/incidentresponse/blob/main/Get-Log4shellVuln.ps1 to find any jars with the JNDI look up.
- Remote searching log4j [Windows]
- Is this Powershell script thorough for detecting the Log4J vulnerability?
- Nice Log4J Response Arcserve....
- Everybody thinks that they can do IT because they’ve used a computer as users
-
Log4j PDQ scan profile
For now, I've setup two different scanners in PDQ. One of the PDQ example, and one of another I found, and running both to be safe. Here is the 2nd one I'm using, I modified it though so it wasn't trying to write direct to the C drive, as that may fail (but it does have to go to a folder that exists). https://github.com/sp4ir/incidentresponse/blob/35a2faae8512884bcd753f0de3fa1adc6ec326ed/Get-Log4shellVuln.ps1
PowerShellSnippets
-
Script all database object to single file per object using dbatools
So if for whatever reason you can't get the dba tools to work (it looks like there is a viable answer above), you can always use scripting options with the script method to script out database objects, via SMO. I have a sample script here which is a bit different from what you've asked for, but shows the fundamentals of what you might want to do.
- Log4j vulnerability mitigation
-
In case anyone needs it, here's a quick and dirty powershell script to patch log4j to prevent log4shell (CVE-2021-44228)
Not that messy! I added a link to this thread and direct to the github link from my README on my scanner utility repo. When I get a chance I may borrow this and updated it to use the same remote methods I used in the last script, but read the file/computer list from my generated CSV - that way people can clean up the CSV for their particular targets, and push an update with this script. Nice work!
- The Log4j Vulnerability Explained : Detection and Exploitation | TryHackMe Log4j
-
Log4j PDQ scan profile
The issue with searching for log4j*.jar is that you miss out on bundled jars which have different filenames hashes. It might be a better approach to search for all jar files and look inside if there is a jndilookup.class mentioned. This might add some false positives - but this is imho better than false negatives. Here is a powershell script which implements that approach: https://github.com/omrsafetyo/PowerShellSnippets/blob/master/Invoke-Log4ShellScan.ps1
- Log4j 0day being exploited (mega thread/ overview)
- Log4Shell Scanner multi-server, massively parallel PowerShell
What are some alternatives?
log4jscanwin - Log4j Vulnerability Scanner for Windows
CVE-2021-44228-Log4Shell-Hashes - Hashes for vulnerable LOG4J versions
nse-log4shell - Nmap NSE scripts to check against log4shell or LogJam vulnerabilities (CVE-2021-44228)
Logout4Shell - Use Log4Shell vulnerability to vaccinate a victim server against Log4Shell
log4shell-tool - Log4Shell Enumeration, Mitigation and Attack Detection Tool
Log4j-PoSH - Powershell tools for log4j vulnerability
local-log4j-vuln-scanner - Simple local scanner for vulnerable log4j instances
CVE-2021-44228-Scanner - Vulnerability scanner and mitigation patch for Log4j2 CVE-2021-44228
hotpatch-for-apache-log4j2 - An agent to hotpatch the log4j RCE from CVE-2021-44228.
PatchAgainstLog4Shell - This is for patching against Log4Shell in Windows via Powershell
jmxfetch - Export JMX metrics