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

Dockerfile #32

Closed
Closed
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
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ubuntu:16.04

RUN apt-get update && \
apt-get install -y \
python \
python-pip \
libcapstone-dev \
&& \
rm -fr /var/lib/apt/lists/*

RUN pip install 'capstone>=3.0,<4.0'

COPY . /src/github.com/xoreaxeaxeax/sandsifter
WORKDIR /src/github.com/xoreaxeaxeax/sandsifter
Copy link

Choose a reason for hiding this comment

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

There's not really a need to namespace the code so thoroughly, as installing a dozen other applications or different versions would be an anti-pattern for running containers. /sandsifter or /app would suffice.


RUN make

ENTRYPOINT ["/usr/bin/python", "/src/github.com/xoreaxeaxeax/sandsifter/sifter.py"]

Choose a reason for hiding this comment

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

I think it would be a good idea to have an entrypoint that is a shell-script using this as one of many optional actions, provisioning for arbitrary container command execution.

CMD ["--unk", "--dis", "--len", "--sync", "--tick", "--", "-P1", "-t"]
ENV TERM=xterm-256color
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,36 @@ in seconds), it is typically because these flags are required for the processor
you are scanning.


### Docker

A docker image may be built and used:

```
docker build -t sandsifter .
docker run -it --rm --privileged \
-v $(pwd)/data:/src/github.com/xoreaxeaxeax/sandsifter/data \
sandsifter
```

It must be run with `--privileged`.

You may change the arguments to the `./sifter.py` by passing additional args:

```
docker run -it --rm --privileged \
-v $(pwd)/data:/src/github.com/xoreaxeaxeax/sandsifter/data \
sandsifter --unk --dis --len --sync --tick --low-mem -- -P1 -t -N
```

After completion you can run the summarize script with:

```
docker run -ti --rm \
-v $(pwd)/data:/src/github.com/xoreaxeaxeax/sandsifter/data \
--entrypoint=/src/github.com/xoreaxeaxeax/sandsifter/summarize.py \
sandsifter data/log
```

### README TODO

* algorithms: random tunneling brute driven/mutator
Expand Down