Translate Article / Choose Language:
Sandeep Bhondwe Termux Tool Awareness & Testing No Root Needed 5-Min Setup 100% Tested (2026)
Welcome back to Sandeep Tech! Security awareness is one of the weakest links in every organization, and the best way to strengthen it is through controlled, authorized testing. STPhish is an advanced phishing awareness and security testing framework built for Termux on Android. Inspired by the popular Zphisher project, it lets security researchers, students and IT teams simulate realistic login pages, generate temporary public links through tunneling services, and measure how people respond to social-engineering attempts — all from a phone, with no root access and no computer required.
🚫
Legal & Ethical Disclaimer: Phishing attacks against real users without written consent are illegal in virtually every jurisdiction and violate laws such as the IT Act (India), CFAA (USA), Computer Misuse Act (UK) and the GDPR. STPhish is published here strictly for educational purposes, authorized penetration testing and employee awareness programs. Only test systems, domains and accounts you own or have explicit permission to test. Sandeep Tech does not support, endorse or assist in any unauthorized credential harvesting, fraud or privacy violation.

🧩 1. What is STPhish? Features & Capabilities

STPhish is a Termux-based phishing awareness and security testing tool maintained by Sandeep Tech. It is heavily inspired by Zphisher, one of the most widely used open-source phishing simulation frameworks in the security community. Instead of rewriting a black-box malware tool, STPhish packages the same educational concept into a simple, mobile-friendly installer that runs entirely inside the Termux Linux environment.

The core purpose is awareness training — not credential theft. Security teams use tools like this to measure how many employees click a suspicious link, how many type their password, and how quickly they report the incident. The results drive training programs and improve organizational resilience.

Ready-Made Login Templates

STPhish ships with a library of pre-built HTML login page templates for popular services. Templates are static educational simulations designed for awareness demonstrations inside your own lab.

Built-In Tunneling Support

Integrated support for tunneling providers such as Cloudflared and Localhost.run lets you generate a temporary public HTTPS link so test participants can reach your simulation page from any device.

100% Termux Native

Runs completely inside Termux on Android. No root, no Magisk, no custom ROM and no PC is needed — perfect for students learning security on a budget phone.

Live Captured-Data Log

Submitted form data is displayed in real time inside the terminal so you can immediately measure the success rate of an authorized awareness campaign.

Automatic Dependency Installer

The official setup script installs PHP, Git, Wget, curl and the tunneling binaries automatically, saving beginners from dependency hell.

Education-First Design

Every menu includes guidance on authorized use, making STPhish a practical learning companion for cybersecurity courses and CTF practice labs.

🔥 2. Prerequisites & System Requirements

Before running the installer, verify that your Android device meets the following technical prerequisites:

Official Termux Build

Install Termux from F-Droid or the official GitHub releases page. The Google Play Store version is abandoned and its repositories will throw 403 and 404 errors.

Stable Internet Connection

You need an active connection to download the setup script, PHP runtime, and tunneling binaries. A Wi-Fi connection is recommended for the first installation.

Free Storage Space

Keep at least 200–300 MB of free internal storage. PHP, Git, Wget and the tunneling binaries together consume a significant amount of space on first install.

No Root Required

STPhish runs in user space. You do not need Magisk, KernelSU, APatch or an unlocked bootloader. Standard Android 8.0 and above is sufficient.

💡
Beginner Tip: If you have never used Termux before, first read our detailed guide on Termux setup and storage permissions. Basic familiarity with Linux commands like cd, ls, and bash will make this tutorial much easier to follow.

🧠 3. How Phishing Simulations Work (Architecture Explained)

To understand STPhish, it helps to understand the general architecture behind every phishing simulation framework. The tool does not "hack" anything — it simply hosts a web page and records what a visitor submits, exactly like a normal web form.

  • Step 1 — Local Web Server: STPhish starts a lightweight PHP development server on your device, binding to 127.0.0.1 on a chosen port (typically 8080). This server only listens locally.
  • Step 2 — Template Rendering: When you select a login template, STPhish copies the corresponding HTML/PHP files into the server root. A visitor sees a look-alike login page — but it is a static simulation, not a real login to any service.
  • Step 3 — Public Exposure via Tunnel: Because 127.0.0.1 is only reachable from the same device, the framework offers tunneling. A tunneling client creates an outbound connection to a public service and maps a temporary HTTPS subdomain back to your local port.
  • Step 4 — Form Submission Handling: Any data typed into the simulation form is written to a local log file (ip.txt / usernames.txt style) and printed in the terminal, so the tester can measure awareness rates.
  • Step 5 — Reporting & Debrief: In an ethical awareness campaign, the test concludes with a debrief — participants are told they were tested, the results are used for training, and no real credentials are ever used or stored.
⚠️
Critical Distinction: The difference between a simulation and a real phishing attack is authorization. In a simulation you own the target, you control the participants, and you destroy the collected data immediately after the debrief. Without permission, the exact same technical action becomes a criminal offence.

⚡ 4. Step-by-Step Installation on Termux

Follow these numbered instructions in sequential order. Each command should be typed or pasted into the Termux terminal, then executed by pressing Enter.

Step 1
Install the Maintained Termux Build (F-Droid)

The Google Play Store edition of Termux was discontinued in 2020 and will throw broken repository errors. Download the latest official APK from F-Droid:

👉 Official F-Droid Link: Download Termux from F-Droid

Step 2
Update & Upgrade Termux Packages

Open Termux and refresh the package index. This ensures you download the latest available versions of every dependency:

bash - package manager
apt update && apt upgrade -y

If the update hangs or shows connection timeouts, run termux-change-repo, select Main repository, and choose an alternative mirror such as Albatross or Grimler.

Step 3
Install Git & Wget

Git is used to clone repository resources and Wget is required to download the official setup script. Install both in sequence:

bash - install utilities
apt install git -y
apt install wget -y

Verify the installation with git --version and wget --version. Both commands should print a version number.

Step 4
Download the Official STPhish Setup Script

Fetch the installer directly from the official Sandeep Tech link:

bash - download installer
wget https://link.sandeeptech.dev/stphish-setup

You should see a progress bar and a message like 'stphish-setup' saved. If Wget reports a certificate error, run pkg install ca-certificates -y and retry.

Step 5
Execute the Setup Script

Run the downloaded installer using the Bash shell. The script will automatically install PHP, the tunneling binaries, clone the tool files and configure permissions:

bash - run installer
bash stphish-setup

Installation output will resemble the following (actual text may differ slightly by version):

[+] Checking dependencies...
[+] Installing PHP runtime...
[+] Cloning STPhish core files...
[+] Configuring tunnel binaries...
[✓] STPhish installed successfully!
[i] Run the tool by typing: stphish
Pro Tip: If you get Permission denied, run chmod +x stphish-setup first and then execute it again with bash stphish-setup.
Step 6
Launch STPhish

Once the installer finishes, start the tool by typing its command name:

bash - launch STPhish
stphish

The interactive STPhish banner and menu will appear. From here you can choose a simulation template, select a port, and pick a tunneling service for an authorized awareness test.

✅
All Commands in One Place: If you are already comfortable with Termux, you can run the entire installation as a single sequence:
apt update && apt upgrade -y && apt install git -y && apt install wget -y && wget https://link.sandeeptech.dev/stphish-setup && bash stphish-setup

🚀 5. Running STPhish: Menu Walkthrough & Tunneling

After typing stphish, the tool presents an interactive menu. The exact numbering may change between releases, but the workflow is always the same:

Step A: Choose a Simulation Template

Select one of the available login page templates from the list. These are static HTML/PHP pages used purely for demonstrating how convincing a well-designed phishing page can look — the core lesson of any awareness program.

Step B: Select a Local Port

The tool will ask for a port number to host the local PHP server. The default 8080 is almost always fine. If you receive an "address already in use" error, simply pick 8081 or 9090.

Step C: Choose a Tunneling Service

Because 127.0.0.1 is only accessible from your own phone, you must select a tunneling provider to obtain a public URL. STPhish typically offers:

Tunnel Option Purpose Best For
Cloudflared Creates a trycloudflare.com HTTPS link Quick demos, mobile testing
Localhost.run SSH-based public URL Low-bandwidth lab setups
Localhost (127.0.0.1) No public exposure Self-testing on the same phone

Step D: Share the Link & Monitor Submissions

In an authorized awareness test, share the generated link with the consenting participants and observe the live capture log in the terminal. The log records what was submitted so you can calculate a click-through and submission rate for your report.

[*] Local server running on 127.0.0.1:8080
[*] Tunnel URL: https://example-tunnel.trycloudflare.com
[+] Visitor connected from 192.168.x.x
[+] Form submitted (simulation log saved)
🛑
Stop and Think: If you are about to send this link to someone who has not agreed to be tested, you are committing a crime — not performing security research. Close the terminal, delete the generated link, and review the ethical guidelines in Section 8.

📊 6. Quick Command Reference Cheat Sheet

Here is an at-a-glance reference of every command used in this guide:

Purpose Command Notes
Update packages apt update && apt upgrade -y Run first, always
Install Git apt install git -y Required for cloning resources
Install Wget apt install wget -y Required for the installer download
Download STPhish wget https://link.sandeeptech.dev/stphish-setup Official Sandeep Tech link
Run installer bash stphish-setup Installs PHP + tunnels
Launch tool stphish Opens the interactive menu
Fix mirrors termux-change-repo Use when downloads fail
List saved logs ls -la Shows captured simulation files

🛠️ 7. Troubleshooting 6 Common Termux & STPhish Errors

Encountering an error during installation? Below are the root causes and instant solutions for the 6 most common obstacles:

Error 1: stphish: command not found
Root Cause: The installer did not complete, or the executable directory is not in your PATH.
Solution: Re-run bash stphish-setup and read the final lines of the output carefully. If mirror errors appear, run termux-change-repo and pick an active mirror before retrying.
Error 2: bash: stphish-setup: Permission denied
Root Cause: The downloaded file lacks executable permission bits.
Solution: Grant execute permission and re-run the script:
chmod +x stphish-setup
bash stphish-setup
Error 3: wget: unable to resolve host address
Root Cause: DNS resolution failure, no internet access, or a captive-portal Wi-Fi network.
Solution: Switch to mobile data or another Wi-Fi network, then test connectivity with ping -c 3 google.com. If ping works but Wget fails, install certificates: pkg install ca-certificates -y.
Error 4: The tunnel URL opens only on my phone
Root Cause: You selected the Localhost option, which binds the server to 127.0.0.1 and is unreachable from other devices by design.
Solution: Restart STPhish and choose Cloudflared or Localhost.run instead. Copy the generated https:// URL and share it only with consenting participants.
Error 5: PHP server fails to start (port already in use)
Root Cause: Another process is already listening on port 8080, or a previous STPhish session was not closed properly.
Solution: Close the old session with Ctrl + C, then choose a different port such as 8081, 8888 or 9090 when prompted. You can inspect active listeners with netstat -tlnp.
Error 6: Play Store Termux throws 'Repository is under maintenance'
Root Cause: You are using the deprecated Google Play Store build of Termux.
Solution: Fully uninstall the Play Store version, then install the maintained release from F-Droid and repeat the installation from Step 1.

⚖️ 8. Ethical Testing Rules: Staying on the Right Side of the Law

Tools like STPhish are legal to install and study. What determines legality is how you use them. Follow these non-negotiable rules before running any simulation:

  • 📄 Get Written Authorization: For organizational testing, obtain a signed scope document or engagement letter that clearly defines which users, domains and dates are covered.
  • 🏠 Test Only Your Own Assets: For personal learning, use your own accounts, your own phone numbers and your own email addresses. Never target friends, family or strangers "for fun".
  • 🧪 Use a Lab Environment: Practice inside a virtual machine, a dedicated test domain, or an isolated local network that you fully control.
  • 🗑️ Delete Collected Data Immediately: After the awareness debrief, permanently delete any captured simulation logs. Never store real passwords, even temporarily.
  • 📢 Always Debrief Participants: A simulation without a debrief is just deception. Explain what happened, why it matters, and what the participant should look for next time.
  • 🚫 Never Use Real Credentials: Design simulations so that submitted data is obviously fake or is immediately discarded. Never attempt to reuse any captured password on a real service.
  • 📚 Respect Privacy Laws: Capturing IP addresses and submitted text counts as personal data processing under GDPR, DPDP Act and similar regulations. Document your lawful basis before starting.
  • 🤝 Report, Don't Exploit: If you discover a real vulnerability or a real phishing campaign during testing, report it responsibly to the affected organization or CERT-In.
⚠️
Real-World Consequences: Unauthorized phishing can lead to criminal prosecution, civil liability, permanent academic expulsion and complete loss of professional credibility in the security industry. No tutorial is worth that risk.

🔐 9. 7 Ways to Defend Yourself Against Phishing Attacks

Now that you understand how convincing a phishing page can look, here is how to protect your own accounts and your organization:

  • 🔗 Inspect the URL Carefully: Attackers use look-alike domains like paypa1.com or micros0ft-login.net. Always read the domain from right to left before the first single slash.
  • 🔐 Enable Hardware-Backed 2FA: FIDO2 security keys and passkeys are phishing-resistant because they cryptographically bind the login to the legitimate domain.
  • 🧭 Never Log In Through Emailed Links: Open the official app or type the website address manually instead of clicking a link in an unexpected message.
  • 📨 Verify the Sender Separately: If an email claims to be from your bank or employer, call the official number you already know — never the number inside the suspicious message.
  • 🕵️ Watch for Urgency & Fear Tactics: Phrases like "your account will be suspended in 24 hours" are classic social-engineering pressure cues designed to bypass rational thinking.
  • 🧑‍🏫 Run Regular Awareness Training: Organizations that conduct authorized simulations and follow-up training reduce click rates dramatically within a few months.
  • 🛡️ Deploy Email & DNS Filtering: Use DMARC, SPF and DKIM validation plus a secure web gateway to block look-alike domains before users ever see them.
Sandeep Tech Recommended Privacy Tool: TempMail Pro

Safeguard your real identity and stop inbox spam when downloading cybersecurity utilities, registering on tech forums, or testing GitHub scripts. Create instant, encrypted disposable inboxes in 10 seconds without phone verification using TempMail Pro.

🚀 Generate Free Disposable Email at tempreply.com

❓ 10. Frequently Asked Questions (FAQ)

Q1: Is STPhish legal to use?
Answer: STPhish itself is a security testing utility, but using it against people or organizations without written authorization is illegal in most countries and violates IT compliance laws. Use it only on your own lab environment, your own domains, and with explicit consent from participants.
Q2: Does STPhish require root access on Android?
Answer: No. STPhish runs inside the Termux user environment and does not need root, Magisk, KernelSU or an unlocked bootloader. It only requires Termux, an internet connection and the packages git, wget, php and a tunneling binary.
Q3: Why does my STPhish link not open on other devices?
Answer: A localhost or 127.0.0.1 link only works on the same device. To open the simulation page on another phone or PC you must select a tunneling option such as Cloudflared or Localhost.run in the STPhish menu, which generates a public HTTPS URL.
Q4: Why does Termux from the Google Play Store fail with repository errors?
Answer: The Play Store build of Termux was deprecated in 2020 due to Target SDK restrictions and its repositories are permanently broken. Always install Termux from F-Droid or the official GitHub releases page.
Q5: What is the difference between phishing simulation and real phishing?
Answer: A simulation is an authorized, controlled test where participants are informed afterwards, no real credentials are misused, and the goal is user awareness. Real phishing is an unauthorized criminal act that steals data for fraud. Simulation is ethical; real phishing is illegal.
Q6: Why does the setup script fail with 'Permission denied'?
Answer: Run the installer using bash, not sh: bash stphish-setup. If the file is still not executable, run chmod +x stphish-setup first and then execute it with bash.
Q7: Can I use STPhish to test my company's employees?
Answer: Only with written approval from your organization's management and IT/security team, and preferably with a defined awareness policy. Unauthorized internal phishing tests can breach employment law, privacy regulations and internal compliance rules.
Q8: Why does Cloudflared tunneling fail or disconnect immediately?
Answer: Tunnel providers rate-limit and block abusive traffic. Check your internet connection, avoid shared public Wi-Fi that filters outbound connections, update Termux packages with apt update && apt upgrade -y, and retry with an alternate tunnel option.
Q9: Does running STPhish affect SafetyNet or Play Integrity?
Answer: No. STPhish is a user-space script running inside Termux and does not modify the system partition, so it does not affect Play Integrity. Rooting a device is a separate matter and can affect integrity verdicts.
Q10: Why does Termux say 'stphish: command not found' after installation?
Answer: The installer places the executable in a directory that may not be in your PATH, or the installation did not finish. Re-run bash stphish-setup, use termux-change-repo to switch to a working mirror if downloads fail, and check the installation output for errors.
Sandeep Bhondwe - Sandeep Tech

Author: Sandeep Bhondwe (Sandeep Tech)

Cybersecurity Researcher, Ethical Hacker & Linux Enthusiast. Specializing in Android internals, network penetration testing, and mobile privacy. Join our official community on Telegram: @sandeep_hacker

Post a Comment

Previous Post Next Post
Live