Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

minor fixes of readme and feedback of scanner.py #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ A network dump of the scanner running against a Windows 2019 Server (10.0.0.133)
## Usage
`python3 scanner.py <IP>`

You can use networks as IP, for example

`python3 scanner.py 10.0.0.0/24>`

## Requeriments

`pip3 install netaddr`


## Workarounds

[ADV200005 | Microsoft Guidance for Disabling SMBv3 Compression](https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/adv200005)

```
Expand Down
5 changes: 3 additions & 2 deletions scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
subnet = sys.argv[1]

for ip in IPNetwork(subnet):

print(f"Testing {ip}")
sock = socket.socket(socket.AF_INET)
sock.settimeout(3)

try:
sock.connect(( str(ip), 445 ))
except:
sock.close()
print(f"{ip} not available")
continue

sock.send(pkt)
Expand All @@ -26,4 +27,4 @@
if res[68:70] != b"\x11\x03" or res[70:72] != b"\x02\x00":
print(f"{ip} Not vulnerable.")
else:
print(f"{ip} Vulnerable")
print(f"{ip} Vulnerable")