ErdemOzgen / blackcart

Custom Black arch based docker container for continuous automated red teaming
GNU General Public License v3.0
13 stars 5 forks source link

Path issue of gf command #25

Closed ataseren closed 5 months ago

ataseren commented 5 months ago

In Blackcart, which gf command returns the path of gf command. However, in Blackdagger, which gf command doesn't work.

The important aspect of this is that gf command is not found in Blackdagger and causes errors in YAML executions.

The workaround for this is adding:

env:
  - HOME: /root/
  - LOG_DIR: ${HOME}/logs
  - PATH: /usr/local/bin:${PATH}

in YAML.

This issue may appear for other tools too. The environment addition solves it but we should delve into this and other path and environment discrepancy.

ErdemOzgen commented 5 months ago

Know issue good catch !

ErdemOzgen commented 5 months ago

servicestart script updated as it is:


#!/bin/bash

# Run your other command here
export PATH=/usr/local/bin:/root/go/bin:/usr/lib/jvm/java-11-openjdk/bin:/work_dir/blackcartenv/bin:/root/go/bin:/sbin:/usr/bin:/root/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/bin/core_perl:/root/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/bin/core_perl:/usr/games/bin:
blackdagger server &
blackdagger pull cart

# Run gotty in the foreground
gotty -p 8090 -w --credential blackcart:blackcart /bin/bash