Cyberlium

Ethical › Module 20 › Lesson 3

BeginnerModule 20Lesson 3/5

Keys You Must Not Paste in Reports

Redact secrets; store lab keys in cyberlium-lab chmod 600.

15 min+40 XP4 quiz
Module progress3 of 5

Visual · keys_redact_reports

Reports travel: email, tickets, client PDFs. Private keys, tokens, and lab passphrases do not belong in those pages. Toy secrets live in cyberlium-lab at mode 600.

Opening

A brilliant finding dies when the PDF also contains the private key. Redact. Lock lab secrets. Do not paste.

Lesson 1 said hashing is not encryption. Lesson 2 said a padlock is not “site is safe.” This lesson is the operational half Topic 8 already named as key management: generate, store, rotate, revoke — plus the authorized-tester failure that shows up in real write-ups. A report is a document that travels. It is emailed. It is attached to a ticket. It is forwarded to a vendor. It is stored in a portal whose ACLs you do not control. Anything you paste into that document is a secret you just published to every hop. Testers still screenshot BEGIN PRIVATE KEY,.pem files, AWS keys, session cookies, and lab passphrases “as evidence.” That is not evidence. That is a second incident. The finding can say a key was exposed on a host in scope. The appendix can say “credential stored in the engagement vault, not in this PDF.” The PDF must not contain the key. This is original Cyberlium teaching mapped to the CEH v13 cryptography domain — not official EC-Council training, not a cert, not exam dumps. You will write a redaction map into $HOME/cyberlium-lab. You may generate a toy secret with openssl rand or Python secrets, store it in a file that is not the report, chmod 600, and write REDACTED in the notes that stand in for a report. You will not commit the toy to git. You will not paste it into chat. You will not reuse it on a real account. Next is Lab — Re-hash a File and Recheck a Cert: YOUR file SHA-256 plus example.com public fields, notes ceh-crypto-lab.txt chmod 600. Still no hashcat. Still no fake CA.

1. Reports travel — treat every paste as a publication

Confidentiality of a test is not only the target’s data. It is also the artifacts you created: screenshots, packet notes, copies of configs, toy keys you generated to demonstrate a fix. Module 1’s RoE already said written scope. Module 20 adds written hygiene for secrets inside your own deliverable. If a client can forward the PDF to a contractor, the contractor now has every unredacted secret. If you upload the PDF to a class portal, the class now has it. If you leave the report world-readable in Downloads, the next local account has it. chmod 600 on lab files is the same control as “do not paste.” They are one habit: secrets stay in a small, locked place; narratives stay in the document that moves. Empty ethics lines fail. A report that is “complete” only because it includes the PEM fails this lesson even if the TLS fields were correct.

Screenshots fail the same way. A terminal that still shows openssl genrsa output, a browser that still shows a session cookie, a cloud console that still shows a secret value — crop or regenerate. “I will remember to crop later” is how later never happens. If you must prove a key existed, prove the filename, the permission bits, the last four characters, or a SHA-256 of the key file you already stored under cyberlium-lab — Lesson 1’s fingerprint — not the key material itself. Matching a fingerprint is how you show you hashed the same file without publishing the file. That is the point of a digest in a report. Publishing the digest of a public ISO is fine. Publishing the digest of a private key is still better than publishing the key, but the private key file must not travel beside the digest.

Command guide

Reports travel — WHAT/WHY

═══ COMMANDS ═══

Command — copy this

cat >> "$NOTES" << 'EOF'
reports_travel: treat every paste as a publication
rule: narrative in the report; material in a locked lab file
EOF

2. What counts as a secret: keys, tokens, cookies, passphrases, dumps

Treat as secret unless a written policy says otherwise: private keys and PEM blocks (BEGIN PRIVATE KEY, BEGIN RSA PRIVATE KEY, BEGIN OPENSSH PRIVATE KEY), PKCS#12 passphrases, TLS client certs paired with keys, API tokens, cloud access keys, database passwords, password-reset links, session cookies, MFA backup codes, lab passphrases you generated for this course, hashes stolen from other people (Lesson 1 already refused dumps). Public keys and public certificates are not the same class — Lesson 2’s example.com leaf is public by design. Mixing public leaf and private key in one gist is how people leak the wrong file. Connection strings in screenshots are secrets. .env files are secrets. The word “example” in a filename does not make a live token safe. If you generated it, lock it. If you found it on a host in scope, put it in the vault your RoE named — in this course, that vault is a chmod 600 file under cyberlium-lab that is not the report notes — and write REDACTED in the report stand-in.

Production stores were named in Topic 8: HSM, cloud KMS, secret managers with IAM, OS keychains, password managers for humans. Local scripts: environment variables or a chmod 600 gitignored file — never the source tree you push. Public GitHub is not a vault. Slack is not a vault. Discord is not a vault. A world-readable USB stick is not a vault. Emailing yourself the PEM is not a vault. This course uses toy keys so you can practice the habit without burning a real tenant. A leak of a lab passphrase must not open your real accounts, which is why you will not reuse it. If a live key ever lands in git, treat it as burned: rotate, follow a real incident process, never “it was only five minutes.” This lesson will not walk you through purging someone else’s history. It will walk you through not putting the key in the file you are about to attach.

3. Redaction pattern: narrative in the report, material in a locked lab file

A usable report sentence looks like this: “Host in scope presented a private key file at path P with mode 644. Evidence stored in the engagement vault as object ID … Last four of fingerprint … Recommended: move to 600, rotate the key, reload the service.” A failing report sentence looks like this: then the next page is the entire PEM. Another failing sentence: “password is hunter2” in the executive summary. Another: a screenshot of AWS_SECRET_ACCESS_KEY in a Slack export you attached as Appendix C. Redaction is not lying. It is splitting audience. The owner who must rotate needs a handle and a location. The PDF audience needs the finding, the impact, and the fix. They do not need to become additional holders of the secret. If your class asks to “see the key to grade you,” show the locked file listing and the fingerprint, not the bytes — and in this course the grader is you plus the mission checkbox.

Generate toy material with a CSPRNG: openssl rand -hex 16, Python secrets.token_hex(16), not time.time(), not four words from a meme. Write it once into $HOME/cyberlium-lab/toy-lab-secret.txt. chmod 600. Do not echo it into keys-reports-notes.txt. The notes that stand in for a report say: toy secret stored separately, mode 600, not pasted here, not reused on real accounts, not committed. If you already pasted it, rotate: generate a new toy, overwrite the secret file, leave REDACTED in the notes, do not try to “edit history” of a chat by sending it again. Least privilege still applies: one toy per job. The staging passphrase is not the production passphrase. In this course there is no production passphrase. That is the point.

4. Lifecycle carry: generate, store, rotate, revoke — still toy keys only

Topic 8’s lifecycle still holds in a CEH-shaped domain. Generate with OS/crypto RNG and enough length. Store where access is controlled. Use with least privilege. Rotate on a schedule and after suspicion. Revoke when a name or key is dead — CAs revoke certificates; cloud IAM disables access keys; you disable a token in the control plane. The plan must exist before the breach. Homebrew XOR and verify=False stay refused. You will not invent a cipher to “practice report screenshots” against a classmate’s homework server. You will not disable TLS verification in a script you then point at a bank because a lab CA was annoying. Fix trust on machines you own. Fix certificates on stacks you run. Reports that recommend verify=False as a workaround fail this module the way café nmap failed Module 3.

Chain-of-custody from Lesson 1 helps here: if you must prove two copies of a config match, hash them. If you must prove you did not alter a public cert PEM you saved, hash that PEM — it is public. If you must prove a private key file did not drift in your vault, hash it locally and put only the hex in working notes that stay chmod 600, never in the traveling PDF. Do not hash /etc/shadow to “manage keys.” Do not hashcat anything you redacted. Redaction is not a puzzle for the class to invert.

5. What you record: redaction map, toy secret location, refuse paste, locked notes

A keys-and-reports note is boring on purpose. Date (UTC). What a traveling report may contain (finding, path, permission bits, fingerprint last-four or SHA-256 of a vaulted file). What it must not contain (PEM private blocks, tokens, cookies, live passwords, dumps). Where the toy secret lives ($HOME/cyberlium-lab/toy-lab-secret.txt, chmod 600, not in this report file). Ethics: NEVER paste private keys in PDFs/chat/git, NEVER reuse lab secrets on real accounts, NEVER commit .pem, NEVER hashcat the redacted material, NEVER screenshot cookies into Discord. Legal line: original Cyberlium teaching mapped to the CEH v13 cryptography domain — not official EC-Council training, not a cert, not exam dumps. Path: $HOME/cyberlium-lab/keys-reports-notes.txt, chmod 600. Empty files fail. Files that contain the toy secret in plaintext fail this lesson even if chmod is 600 — that file is the report stand-in, not the vault.

A useful feeling: the lesson is “too small” because you did not attach a real key. That feeling is how people leak tenants. The skill is splitting vault from narrative. Lesson 4 will not ask you to paste a key either. It will ask you to re-hash a file YOU created and recheck example.com fields. Keep the toy secret locked and unused on real accounts. Next after the lab is the path-final quiz.

6. Wrong vs right: gist of a PEM vs redacted narrative plus a chmod 600 vault file

Worked failure — same word “evidence,” opposite blast radius. Right never needs the traveling PDF to hold the key.

  • Wrong

    Paste BEGIN PRIVATE KEY into a report, ticket, gist, Discord, or git. Screenshot AWS keys and cookies “for the appendix.” chmod 777 the lab folder. Reuse the toy passphrase on email. Call hashcat of a redacted hex extra credit. Recommend verify=False. Claim this path is official EC-Council training. It is not a cert and does not grade a leak.

  • Right

    Write findings without secret material. Generate a toy with a CSPRNG, store it in $HOME/cyberlium-lab/toy-lab-secret.txt, chmod 600, put REDACTED in keys-reports-notes.txt (also chmod 600). Fingerprints instead of keys in anything that travels. Next: Lab — Re-hash a File and Recheck a Cert — YOUR SHA-256 plus example.com public fields.

7. Hands-on: toy secret in a vault file, REDACTED report notes, chmod 600 both

On a computer you own, create cyberlium-lab if needed. Generate a toy secret into toy-lab-secret.txt only. Fill keys-reports-notes.txt with the redaction map and the word REDACTED where a bad report would have pasted the secret. chmod 600 both files. Do not print the toy into the notes. Do not add a real API key to make it “more realistic.” Windows: WSL, Git Bash, or py plus a restricted ACL. Do not commit either file.

Mission: keys-reports-notes.txt REDACTED, toy secret 600

1) Generate a toy secret with openssl rand or Python secrets into $HOME/cyberlium-lab/toy-lab-secret.txt and chmod 600. Do not reuse it on real accounts. 2) Fill $HOME/cyberlium-lab/keys-reports-notes.txt with the redaction map and REDACTED (not the secret). chmod 600. 3) Ethics: no PEM in PDFs/chat/git, no cookie screenshots, no hashcat of redacted material, no verify=False workaround.

Stuck? Ask Cyberlium AI Mentor

If “evidence is not real unless the PDF has the PEM” still feels true, ask for a hint — not a key to paste. Try: "Hint only: why reports travel, what REDACTED means, where toy-lab-secret.txt lives at chmod 600, and why fingerprints beat pasting keys?" You still fill keys-reports-notes.txt. No git. No Discord PEM. No real account reuse.

You now split vault from narrative: toy secrets locked in cyberlium-lab, traveling notes REDACTED, lifecycle still generate-store-rotate-revoke. This is original Cyberlium teaching mapped to the CEH v13 cryptography domain — not official EC-Council training, not a cert, not exam dumps. Next — Lab — Re-hash a File and Recheck a Cert — Topic 8 labs again: SHA-256 of a file YOU created plus example.com certificate fields. Notes ceh-crypto-lab.txt chmod 600. No hashcat. No fake CAs against others.

Knowledge Check

1

APPLY: A teammate pastes BEGIN PRIVATE KEY into the PDF “so the client can reproduce,” then gists the toy passphrase. What is the report vs vault split, and what do you do?

Multiple choice

Knowledge Check

2

APPLY: True or False: Reusing the lab passphrase on email is fine if keys-reports-notes.txt says REDACTED, because redaction encrypts the real account.

True or False

Knowledge Check

3

APPLY: Which pairing matches allowed artifacts and hygiene for this lesson?

Multiple choice

Knowledge Check

4

APPLY: curl of http://192.168.0.1/ shows a home router login (TP-Link / Netgear / Huawei / "Router Admin"). Is that DEMO in scope as a hacking target?

Multiple choice

← Previous

Answer all 4 knowledge checks to continue. (0/4 answered)