
shell script protector (obfuscation, embedded interpreter, DRM) - invisible to kernel tracing
README: English | 中文 | 日本語 | 한국어
Shell scripts invisible even to kernel tracing.
Converts shell scripts into single static binaries with an embedded interpreter, llvm-based obfuscation, and anti-debug protections (shc alternative).
HackTricks: Static embedded-shell execution

Block Flow Graph (Ghidra)
# 1. download docker image (x86_64_linux_musl)
curl -LO https://github.com/HimitsuShell/Himitsu/releases/download/v2.1.0/himitsu_core_x86_64_linux_musl.tar.gz
docker load -i himitsu_core_x86_64_linux_musl.tar.gz
# 2. start container
docker run --name himitsu_core -d -it himitsu_core
# 3. upload your shell script (must be named launcher.sh)
docker cp launcher.sh himitsu_core:/var/work/
# 4. build and download binary (10–20 seconds)
docker exec himitsu_core /var/work/compile.sh
docker cp himitsu_core:/var/work/safeLauncher .
- fla # control flow flattening
- bcf # bogus control flow (slow build, larger binary)
- bcf_prob # probability (1–100, default: 30)
- bcf_loop # number of iterations (default: 1)
- sub # instruction substitution (add/and/sub/or/xor)
- sub_loop # number of iterations (default: 1)
- sobf # string encryption
- split # basic block splitting
- split_num # number of splits (default: 2)
# default: sub, sobf (edit /var/work/compile.sh in himitsu_core container)
# default: 2099-01-01 (edit /var/work/compile.sh in himitsu_core container)
OS-Level Logging & Hooking Protection
Executes shell scripts using its own embedded shell interpreter instead of the system shell (e.g., /bin/bash). Shell scripts are not exposed even by OS-level logging and hooking (auditd, bpftrace).
String & Constant Encryption
All strings and constants in the binary are encrypted, making static analysis more difficult (e.g., IDA, Ghidra).
Debugger Detection
Continuously detects debuggers during execution, making dynamic analysis more difficult (e.g., gdb, ptrace, strace).
Advanced Obfuscation Techniques
Features instruction substitution, control flow flattening, basic block splitting, function annotations, and bogus control flow.
Expiration Date Verification
Automatically blocks shell script execution after the expiration date.
Known auto decompilation tools:
| HimitsuShell | shc | |
|---|---|---|
| OS-Level Logging & Hooking Protection | ✓ | |
| Dynamic Library Hooking Protection | ✓ | |
| String & Constant Encryption | ✓ | |
| Debugger Detection | ✓ | ✓ |
| Advanced Obfuscation Techniques | ✓ |
Which Linux shells are supported?
Supports POSIX/LSB-compliant shells (e.g., /bin/sh).
Do Bash or Zsh scripts work?
They work, but errors can occur. We recommend testing before use.
Which shell commands are supported?
The commands listed below are built into the binary. Other commands also work, but they rely on the system shell and may be exposed to hooking or logging.
basename bash blkdiscard blkid blockdev bunzip2 bzcat cal cat chattr chgrp chmod chown chroot chrt chvt cksum clear cmp comm count cp cpio crc32 cut date dd deallocvt devmem df dirname dmesg dnsdomainname dos2unix du echo egrep eject env expand factor fallocate false fgrep file find flock fmt fold free freeramdisk fsfreeze fstype fsync ftpget ftpput getconf getopt gpiodetect gpiofind gpioget gpioinfo gpioset grep groups gunzip halt hd head help hexedit host hostname httpd hwclock i2cdetect i2cdump i2cget i2cset i2ctransfer iconv id ifconfig inotifyd insmod install ionice iorenice iotop kill killall killall5 link linux32 ln logger login logname losetup ls lsattr lsmod lspci lsusb makedevs mcookie md5sum memeater microcom mix mkdir mkfifo mknod mkpasswd mkswap mktemp modinfo mount mountpoint mv nbd-client nbd-server nc netcat netstat nice nl nohup nologin nproc nsenter od oneit openvt partprobe paste patch pgrep pidof ping ping6 pivot_root pkill pmap poweroff printenv printf prlimit ps pwd pwdx pwgen readahead readelf readlink realpath reboot renice reset rev rfkill rm rmdir rmmod rtcwake sed seq setfattr setsid sh sha1sum sha224sum sha256sum sha384sum sha3sum sha512sum shred shuf sleep sntp sort split stat strings su swapoff swapon switch_root sync sysctl tac tail tar taskset tee test time timeout top touch true truncate ts tsort tty tunctl uclampset ulimit umount uname unicode uniq unix2dos unlink unshare uptime usleep uudecode uuencode uuidgen vconfig vmstat w watch watchdog wc wget which who whoami xargs xxd yes zcat
Can I use only the obfuscation engine?
Yes. See HimitsuObfuscator
Questions, bug reports, feature requests, and general discussions are welcome.
You can also contact us at [email protected].
Supported by the Pyeongtaek Industrial Promotion Agency (South Korea), a government-affiliated public institution.