hashcat -m 3200 -a 0 -o cracked.txt '$2y$10$Mh4g9QACK10dLICh6ukktuSjVBDXvFZjHH/cwRww9RY0JVNWxgAxK' password.txt
不知道到了多久,反正我的 MacM1 竟然都开始启动风扇了,最后依然没有破解出来。
然后跑 lines 的时候,发现了一个 SUID 的文件。
1 2 3 4
-rwsr-sr-x 1 root root 17K Nov 14 2023 /usr/sbin/run_container (Unknown SUID binary!) --- It looks like /usr/sbin/run_container is using /opt/run_container.sh an d you can modify it (strings line: /opt/run_container.sh) (https://tinyurl.com/suidpath) --- Checking for writable dependencies of /usr/sbin/run_container...
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1": dial unix /var/run/docker.sock: connect: permission denied docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied. See 'docker run --help'. List of Docker containers: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1": dial unix /var/run/docker.sock: connect: permission denied
Enter the ID of the container or leave blank to create a new one: 1 /opt/run_container.sh: line 16: validate_container_id: command not found
OPTIONS: 1) Start Container 3) Restart Container 5) Quit 2) Stop Container 4) Create Container Choose an action for a container: 3 permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/1/restart": dial unix /var/run/docker.sock: connect: permission denied
# Function to list Docker containers list_containers() { if [ -z "$(docker ps -aq)" ]; then docker run -d --restart always -p 8000:8000 -v /home/think:/home/think 4b5aec41d6ef; fi echo"List of Docker containers:" docker ps -a --format "ID: {{.ID}} | Name: {{.Names}} | Status: {{.Status}}" echo"" }
# Function to prompt user for container ID prompt_container_id() { read -p "Enter the ID of the container or leave blank to create a new one: " container_id validate_container_id "$container_id" }
# Function to display options and perform actions select_action() { echo"" echo"OPTIONS:" local container_id="$1" PS3="Choose an action for a container: " options=("Start Container""Stop Container""Restart Container""Create Container""Quit")
select opt in"${options[@]}"; do case$REPLYin 1) docker start "$container_id"; break ;; 2) if [ $(docker ps -q | wc -l) -lt 2 ]; then echo"No enough containers are currently running." exit 1 fi docker stop "$container_id" break ;; 3) docker restart "$container_id"; break ;; 4) echo"Creating a new container..." docker run -d --restart always -p 80:80 -v /home/think:/home/think spip-image:latest break ;; 5) echo"Exiting..."; exit ;; *) echo"Invalid option. Please choose a valid option." ;; esac done }
# Main script execution list_containers prompt_container_id # Get the container ID from prompt_container_id function select_action "$container_id"# Pass the container ID to select_action function