Skip to content

Commit 987a025

Browse files
authored
feat: Order payloads by exploitability and impact (#16)
* feat: Order payloads by exploitability and impact * feat: Add autorun mode (-a), for interactionless execution * feat: Add autorun mode for single command mode * fix: Python 2 compatibility issue
1 parent 0a6acdf commit 987a025

File tree

5 files changed

+194
-76
lines changed

5 files changed

+194
-76
lines changed

.github/workflows/docker-pytest.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ jobs:
2626
- name: Run tests
2727
run: |
2828
docker run --name gtfonow_test_${{ matrix.python-version }} -d gtfonow_test:${{ matrix.python-version }}
29-
29+
- name: Wait
30+
run: sleep 15
3031
- name: Run Pytest
31-
run: docker exec gtfonow_test_${{ matrix.python-version }} su -l lowpriv -c "pytest -v --cov=gtfonow --cov-report=xml --cov-report=term-missing"
32+
run: docker exec -u lowpriv gtfonow_test_${{ matrix.python-version }} pytest -v --cov=gtfonow --cov-report=xml --cov-report=term-missing
3233
- name: Copy coverage report from Docker container to host
3334
run: docker cp gtfonow_test_${{ matrix.python-version }}:/home/lowpriv/coverage.xml .
3435

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ RUN chmod u+s $(which tee)
2323
RUN chmod u+s $(which dd)
2424
RUN chmod u+s $(which mv)
2525
RUN chmod u+s $(which rbash)
26-
26+
RUN pip install mock
2727
RUN useradd -ms /bin/bash lowpriv
2828
RUN useradd -ms /bin/bash higherpriv
29-
29+
RUN ssh-keygen -N '' -f /root/.ssh/id_rsa
30+
RUN cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
31+
RUN echo "ONLY_ROOT_CAN_READ_THIS" > /root/proof.txt
3032
RUN echo "lowpriv ALL=(ALL) NOPASSWD: /usr/bin/head" >> /etc/sudoers
3133
RUN echo "lowpriv ALL=(higherpriv) NOPASSWD: /usr/bin/vim" >> /etc/sudoers
3234

0 commit comments

Comments
 (0)