AI made cracking cheap.
A server that takes money has to be defended all the way down.
During my years in cloud security at Alibaba Cloud I handled 200 trojan intrusions and advanced attacks such as commands pushed through the cloud assistant. That second kind never touches your SSH: with one leaked cloud AccessKey, the attacker sends a single command from the console and every server gets a backdoor in the same minute.
Attacks are getting cheaper. Taking apart an app, an obfuscated front end or a mini-program used to cost a skilled reverse engineer days; now you paste the code into an AI and the signing algorithm, the endpoints and the key you thought was hidden are often on screen within minutes. Scanners use AI too: they rotate identities, guess paths and read your error messages before the next try.
So the rule has changed: there are no secrets on the client; only checks on the server count. Obfuscation buys a few minutes. What actually stops an attacker is a server that recalculates every amount, verifies every payment notification with the gateway and reconciles every balance change, plus a cloud account that holds even when a key leaks.
I turned that experience into 6 Claude Code skills. Install them and let the AI look at your servers, cloud account and payment flow the way an attacker would. Use AI to defend against AI.
Install and go
Copy three commands, then tell Claude Code what you want.
git clone https://github.com/roisantoso-id/lock-every-bit.git mkdir -p ~/.claude/skills cp -r lock-every-bit/skills/sec-* ~/.claude/skills/
- "Use sec-server to audit this server"
- "Check my payment webhook with sec-payment"
- "Use sec-audit to review yesterday's changes"
Not a paper checklist: our production runs on it every day
Live security dashboard; public page, IPs masked.
Four rules for defending in the age of AI reverse engineering
- No secrets on the clientTreat every signing algorithm, endpoint and key in your web app, mobile app or mini-program as already read. No key that can move money lives on the client.
- Only the server decides amountsRecalculate price, quantity, discount and credit on the server; after verifying a payment notification, confirm it with the gateway; credit with an atomic update, once.
- Your cloud account matters more than SSHThe console, AccessKeys and the cloud assistant each equal root on every machine. Turn on MFA for the root account, deny remote-command actions on every key and alert on them in the audit log.
- Use AI to defend against AIEvery morning let an AI review yesterday's changes as an attacker would, and keep a reconciliation alert as the last net: balances only grow from recorded top-ups.
What's inside
Two core skills: server hardening keeps attackers out; payment security keeps the money safe even if they get in. The other four support them.
- Your cloud account matters more than SSH: one leaked AccessKey can push commands to every machine through the cloud assistant, bypassing SSH
- Key-only SSH, no root login; Docker-published ports skip ufw, so your "internal only" rule may not be working at all
- Auto-updates installed is not auto-updates working: some cloud images comment out the security source
Ships with: server-audit.sh read-only audit
- In the age of AI reverse engineering there are no secrets on the client: the server recalculates price, quantity and credit
- Verify every payment notification, then confirm it with the gateway; credit each payment once, with a unique ledger reference as the backstop
- Balances only grow from recorded top-ups: reconcile every 15 minutes and alert on anything without a source
Ships with: PHP / Node webhook verification + idempotent credit code
- The origin only accepts connections from the CDN; forged client-IP headers get nowhere
- Paths like .env, .git and wp-login are dropped before they reach your app
- Cap concurrent dynamic requests per IP, so dozens of parallel requests cannot fill your worker pool
Ships with: nginx / fail2ban templates, exposure-check.sh external check
- Keys never go into git history, logs, URL parameters, front-end code, screenshots or AI chats
- Highly sensitive data: ciphertext bound to its record, two keys kept apart
- Backups encrypted with a public key: even a breached server cannot open old backups
Ships with: secret-scan.sh scans the whole git history
- Alert on every SSH login: if it was not you, something is wrong
- A dead server cannot send its own alert: add external checks from two regions
- A backup you never restored is not a backup: decrypt, import and compare row counts every quarter
Ships with: ssh-login-alert.sh、backup-encrypt.sh
- Two different models review the same files independently, then a third argues against each finding
- Review yesterday's changes every day, plus one high-risk module in rotation
- Comes with 24 real bug classes we found, as a checklist
Ships with: Audit report template
Got one afternoon? Do these 5 things first
In order; each one stands on its own.
- Turn off password and root login for SSHCheck the effective values with
sudo sshd -T | grep -Ei 'passwordauth|permitroot'; both must beno. - See which ports are open to the internetRun
ss -tlnpanddocker ps. Bind databases and Redis to the private network only; leave just 22, 80 and 443 public. - Make sure security updates actually installIn
/etc/apt/apt.conf.d/50unattended-upgrades, the-securityline must not start with//. - Add a gateway check and atomic crediting to your payment webhookAfter verifying the signature, query the gateway with the order number; credit with
UPDATE … WHERE status = 'pending'and only add money when exactly one row changed. - Turn on SSH login alerts, then make an encrypted backup and restore itThese two decide how fast you find out and whether you can recover.
Bugs we found in our own code (excerpt)
All found on live sites and all fixed now. Your code probably has a few of these too.
All 24 classes and their fixes are in sec-audit.
Before you use it
- Only use it on servers and sites you own. The scripts are read-only checks: no attacks, no config changes.
- Your own auto-ban may lock you out. The external check requests paths like
.env, so whitelist your IP first or run it over a phone hotspot. - Never paste keys into an AI. Let it read
.env.example, not.env; sec-secrets includes the Claude Code setting that blocks it. - The numbers are starting points. Tune them to your traffic and keep your tuned thresholds private.
Author
FAQ
Is it free? Can I use it commercially?
Free, under the MIT licence. Modify it, use it commercially or put it in your team's repo; just keep the licence notice.
Does it only work with Claude Code?
Each skill is a folder with a SKILL.md that Claude Code reads directly; other AI coding tools that read Markdown instructions work too. The scripts and nginx / fail2ban templates need no AI at all.
What language are the skills written in?
The SKILL.md files are in Chinese, which Claude reads without trouble; scripts, templates and code samples are language-neutral. The GitHub README comes in Chinese, English, Indonesian and Japanese.
Will the scripts change my server?
No. server-audit.sh, exposure-check.sh and secret-scan.sh are read-only and only print OK / WARN / FAIL. You decide what to change; each SKILL.md explains every step and how to roll it back.
Why publish security practices?
These are general practices against automated scanning and common bugs; knowing them does not help an attacker get around them. What must stay private are your tuned thresholds, server addresses and unfixed issues, and none of those are in here.
Can I use it to scan other people's sites?
No. Use it only on servers and sites you own. Scanning other people's sites is illegal in many countries.
If it helps, star the repo and pass it to a friend who builds alone. Found a mistake or a better way? Open an issue on GitHub.
Go to GitHub