bitsadmin/wesng

WES not recognizing correctly systeminfo.txt

Closed this issue · 6 comments

After writing "systeminfo > systeminfo.txt" in cmd, I get the following output from the console:

Windows Exploit Suggester 0.94 ( https://github.com/bitsadmin/wesng/ )
[+] Parsing systeminfo output
Traceback (most recent call last):
File "C:\Users\gutip\Desktop\WES\wes.py", line 480, in
main()
File "C:\Users\gutip\Desktop\WES\wes.py", line 111, in main
productfilter, win, mybuild, version, arch, hotfixes = determine_product(systeminfo_data)
File "C:\Users\gutip\Desktop\WES\wes.py", line 252, in determine_product
raise WesException('Not able to detect OS version based on provided input file')
main.WesException: Not able to detect OS version based on provided input file

But if I check the file content, it is printed:

Nombre de host: LAPTOP-HLCEB8UF
Nombre del sistema operativo: Microsoft Windows 10 Education
Versi¢n del sistema operativo: 10.0.17763 N/D Compilaci¢n 17763
Fabricante del sistema operativo: Microsoft Corporation
Configuraci¢n del sistema operativo: Estaci¢n de trabajo independiente
[...]

Thanks for your report! Can you add your systeminfo.txt file as an attachment?

systeminfo.txt
Where it says "..." is information I've erased myself, but it was correctly displayed

Thanks Miguel. I tested your systeminfo.txt on the latest version of wes.py and it works well on both Python 2 and 3. Can you validate if the version you uploaded here also returns the exception?

C:\> wes.py systeminfo.txt -o out.csv
WARNING:root:chardet module not installed. In case of encoding errors, install chardet using: pip3 install chardet
Windows Exploit Suggester 0.94 ( https://github.com/bitsadmin/wesng/ )
[+] Parsing systeminfo output
[+] Operating System
    - Name: Windows 10 Version 1809 for x64-based Systems
    - Generation: 10
    - Build: 17763
    - Version: 1809
    - Architecture: x64-based
    - Installed hotfixes: KB4486553, KB4465477, KB4465664, KB4469041, KB4470502, KB4470788, KB4480056, KB4487038, KB4482887
    - Manually specified hotfixes:
[+] Loading definitions
    - Creation date of definitions: 20190308
[+] Determining missing patches
[+] Applying display filters
[+] Found vulnerabilities
[+] Writing 59 results to out.csv
[+] Missing patches: 4
    - KB4487044: patches 53 vulnerabilities
    - KB4483452: patches 4 vulnerabilities
    - KB4477029: patches 1 vulnerabilty
    - KB4480979: patches 1 vulnerabilty
[+] Done. Saved 59 of the 59 vulnerabilities found

Okay, I found the issue. It's because of the "chardet" python package (you do not have it installed)
I've removed it and now it works

Ah, good point! On my test machine I indeed don’t have it. Will check again later to see if I can fix the bug. Thanks for reporting back.

Turned out the ¢ in 10.0.17763 N/D Compilaci¢n 17763 broke the regular expression. Fixed this in the latest commit.