Skip to content
leg3ndProjects & tools
01Home02Projects03Tools04Notes
GMT+8
O/ OSCP exploitation reference
Workspace controls Memory only · 0 steps
Visualize path ↗
Command values 0 filled

Temporary connection values clear on reload. Passwords, hashes and tickets remain placeholders. Check address-family syntax in the selected command.

Reference index ↗ Search all procedures & variants ↗
01Discovery02Enumeration03Initial access04Usable access05Local privilege06Active Directory07Internal access08Evidence & reporting

QUICK REFERENCE

Discovery›Services›Web mapping›Web exploitation›Credentials›Public exploits›Sessions & transfers›Linux escalation›Windows escalation›AD enumeration›AD identity attacks›Lateral movement›Pivoting & tunnels›Execution troubleshooting›Integration & evidence›
174 methods · 15 topicsFull reference on GitHub ↗Commands · scripts · next steps
Tools/OSCP/Usable access/Sessions & transfers
← All sessions & transfers tasks

Move a small artifact through a text-only channel

CommandsIf → thenExplanation & examples

Needs: Available Base64 encode/decode, adequate command length and a writable destination

Encode on Linux

# Encode on Linux
base64 -w 0 FILE

# Decode on Linux
printf '%s' 'BASE64_DATA' | base64 -d > /tmp/FILE

Decode in PowerShell

# Decode in PowerShell
[IO.File]::WriteAllBytes('C:\Windows\Temp\FILE',[Convert]::FromBase64String('BASE64_DATA'))

Verify → Require a complete matching hash; keep encoded secrets in private evidence rather than reusable notes.

If it fails → Truncation, wrapping and quoting often corrupt long values. Use a network transfer for larger files. More detail ↓

If → then

  • A simple command works while a longer or nested payload fails → Repair quoting, encoding and command-length boundaries

    Needs: Known outer request/template/database parser and inner shell; correct character encoding and transport length

  • A tool/artifact must reach a target that can make an HTTP request → Transfer over HTTP using Linux or Windows clients

    Needs: Correct server bind and served directory; target-to-server route, available downloader and writable destination

  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context

    Needs: Artifact provenance and format; possible local/domain/application identity and compatible protocol

No useful finding → another task in this topic. Failed check → resolve the failure before ruling out the path.

Explanation & examples

Move a small artifact through a text-only channel

USE WHEN
The existing command channel permits text but no convenient file-transfer connection
STARTING ACCESS
Verified command execution or authenticated remote access and a known network path
RESULT
A reconstructed small file with matching bytes

Recognize the clue

Inspect the existing channel's command-length/quoting limits and whether both sides can reconstruct a small encoded file.

command -v base64
wc -c FILE
SYNTHETIC EXAMPLE OUTPUT
/usr/bin/base64
SMALL_BYTE_COUNT FILE

Means: A small artifact and compatible decoder make text transport plausible, without assuming large encoded commands survive.

Confirm: Verify exact length/quoting and source/destination hash; use the Windows decoding variant when appropriate.

After validation
The complete decoded bytes match: use the text-transfer result.
Ruled out in this context
The channel truncates below the required encoded size: reject a one-command transfer of this artifact.
Still inconclusive
Unknown command limits require a harmless small round trip before relying on the channel.

Troubleshooting: Truncation, wrapping and quoting often corrupt long values. Use a network transfer for larger files.

Additional prerequisite checks

base64 -w 0 FILE
sha256sum FILE

Base64 — move a small file through a text-only channel

Encode on Linux
Decode on Linux
Decode in PowerShell

Use this for small files. Long encoded values are easy to truncate or corrupt; compare hashes.

Why it works

Base64 transports bytes through text; it does not encrypt them or guarantee that the command channel preserves length and quoting.

Worked example · hypothetical

Observation: a short configuration must cross a command-only channel. Test: encode, decode at the destination and compare hashes. Illustrative output: the hash matches. Interpretation: the byte transport succeeded; execution compatibility remains separate.

New identity, privilege, host or route? Re-enumerate → All topic tasks →

Study guide ↗Full procedure ↗Cheatsheet ↗
HomeProjectsToolsNotes
Interactive toolsOSCP notes ↗Extended OSCP workspace ↗Attack-path visualizer ↗

© 2026 Armaan. Built with curiosity.

GitHub ↗GMT+8