2024-03-30
Hacker Virtual Machines, Containers

on termux you use proot-distro for installing kali and blackarch linux.

install via apt install proot-distro


use podman over docker, since we do not need gpu here, and want faster pulling speed.

recent version of podman requires extra layer of domain/index specification before searching and pulling images.

1
2
3
podman search docker.io/kali
podman pull docker.io/kalilinux/kali-rolling


if you want to run network scanning commands like nmap, you would grant the container sufficient permissions:

1
2
podman run --cap-add=NET_RAW --cap-add=NET_ADMIN --rm -it docker.io/parrotsec/security


metasploitable2, parrot linux also have docker images. more cybersecurity/ctf related images to be found.

run this query in search engines:

1
2
site:github.com cybersecurity docker images

https://github.com/VaultSEC/osint

https://github.com/PberAcademy/Dockerimages


on ubuntu you use docker for pulling kali and blackarch linux images. latest images are pushed to docker hub.

1
2
3
4
5
sudo docker pull kalilinux/kali-rolling
# kali-rolling does not contain all packages
# run inside container: apt update && apt install -y kali-linux-headless
sudo docker pull blackarchlinux/blackarch


it is always recommend to update and upgrade the blackarch you installed.

Read More

2022-12-15
Reset Usb

the same for /sys/bus/usb/drivers/*.


in case kali failed to detect presence of hard disks, shall you pop up a dialog for us to decide whether to reset to usb or not.

reset-usb.sh

1
2
3
4
#!/bin/bash
reset-ahci-controllers.sh
reset-xhci-controllers.sh

reset-ahci-controllers.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# this freaking works.
# Script to reset all local xHCI (USB) controllers
# Based on: http://billauer.co.il/blog/2013/02/usb-reset-ehci-uhci-linux/
if [[ ${EUID} != 0 ]]; then
echo This must be run as root!
exit 1
fi
for xhci in /sys/bus/pci/drivers/ahci; do
if ! cd ${xhci}; then
echo "Weird error. Failed to change directory to ${xhci}."
exit 1
fi
echo "Resetting devices from ${xhci}..."
for i in ????:??:??.?; do
echo -n "${i}" > unbind
echo -n "${i}" > bind
done
done

reset-xhci-controllers.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# this freaking works.
# Script to reset all local xHCI (USB) controllers
# Based on: http://billauer.co.il/blog/2013/02/usb-reset-ehci-uhci-linux/
if [[ ${EUID} != 0 ]]; then
echo This must be run as root!
exit 1
fi
for xhci in /sys/bus/pci/drivers/?hci_hcd; do
if ! cd ${xhci}; then
echo "Weird error. Failed to change directory to ${xhci}."
exit 1
fi
echo "Resetting devices from ${xhci}..."
for i in ????:??:??.?; do
echo -n "${i}" > unbind
echo -n "${i}" > bind
done
done

Read More

2022-12-07
Access Kali On Chromebook Or Anywhere

setup tty

i don’t think this will work on android, but let’s see?

1
2
3
ttyd -p <port> -c <username>:<password> <shell_path>
# don't specify interface since that will screw things up

setup x11vnc and novnc

notice novnc has clipboard function now. share clipboard content across devices via the sidebar menu,

in reference of kali official

x11vnc is mirroring the current x11 session. i set it without password.

1
2
3
#retrieved from fish history
x11vnc -threads -forever

then launch novnc server

1
2
novnc  --vnc localhost:5900 --listen 10020

use this url to access from chromebook:

1
2
http://<kali_ip>:10020/vnc.html?host=<kali_ip>&port=10020

Read More

2022-09-07
What Is Causing My Mac To Freeze When Kali Is Offline

modified scripts:

/Users/jamesbrown/Desktop/works/host_discovery_ssh_local_connect/load_tuntap_launch_n2n_kali_root.sh

/Users/jamesbrown/Desktop/works/host_discovery_ssh_local_connect/nginx_with_kali_finder.sh

/Library/Application Support/ZeroTier/One/launch.sh

seems zerotier one is the main cause!

Read More