Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.
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
138 changes: 138 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# To build the container
# docker build -t [container-name] .
# To run the container
# docker run --rm -it [container-name]

FROM debian:stretch-20210721-slim

WORKDIR /exploit-suggester

COPY requirements.txt .
COPY windows-exploit-suggester.py .

RUN apt update -y
RUN apt install -y python3 \
python3-xlrd \
apt-utils \
python-pip \
nano \
vim

RUN pip install -r requirements.txt
ENTRYPOINT ["/bin/bash"]
67 changes: 62 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,28 @@ It was heavily inspired by Linux_Exploit_Suggester by Pentura.

Blog Post: "Introducing Windows Exploit Suggester", https://blog.gdssecurity.com/labs/2014/7/11/introducing-windows-exploit-suggester.html

INSTALLATION
============

For easy docker usage scroll below.

Dependencies: install dependencies `virtualenv`,`python3-xlrd`, `pip install xlrd==1.2.0`,

Run the `setup.sh`
```
$ chmod +x setup.sh
$ ./setup.sh
```

USAGE
=====
update the database

1. Activate the virtualenvironment
```
$ . ./venv/bin/activate
```

2. Update the database
```
$ ./windows-exploit-suggester.py --update
[*] initiating...
Expand All @@ -37,11 +56,8 @@ $ ./windows-exploit-suggester.py --update
[+] writing to file 2014-06-06-mssb.xlsx
[*] done
```
install dependencies

(install python-xlrd, $ pip install xlrd --upgrade)

feed it "systeminfo" input, and point it to the microsoft database
3. Feed it "systeminfo" input, and point it to the microsoft database
```
$ ./windows-exploit-suggester.py --database 2014-06-06-mssb.xlsx --systeminfo win7sp1-systeminfo.txt
[*] initiating...
Expand Down Expand Up @@ -87,6 +103,47 @@ $ ./windows-exploit-suggester.py --database 2014-06-06-mssb.xlsx --ostext 'windo
[M] MS09-072: Cumulative Security Update for Internet Explorer (976325) - Critical
```

BUILD FROM DOCKER
=================

```
docker build -t windows-exploit-suggester .
```

INSTALLATION FROM DOCKERHUB
===========================

[Dockerhub Project](https://hub.docker.com/r/gr33nm0nk2802/windows-exploit-suggester)

```
docker pull gr33nm0nk2802/windows-exploit-suggester
docker tag gr33nm0nk2802/windows-exploit-suggester windows-exploit-suggester
```


USAGE
======

1. Run the Exploit Suggester from interactive terminal

```
docker run --rm -it windows-exploit-suggester
```

2. Inside the interactive terminal save the output of `systeminfo` command into a text file using `nano` or `vim`

3. Update the exploit database

```
./windows-exploit-suggester.py
```

3. Use the exploit database-file and the systeminfo details files with the container.

```
./windows-exploit-suggester.py --database [database-file].xls --systeminfo [systeminfo-file].txt
```

LIMITATIONS
===========
Currently, if the 'systeminfo' command reveals 'File 1' as the output for
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xlrd==1.2.0
12 changes: 12 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# To update the repositories for python3
sudo apt update -y
sudo apt install -y python3-xlrd virtualenv

# Creating and installing pip3 dependencies inside venv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt


Loading