ex:htb:updown:start
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| ex:htb:updown:start [2023/01/01 16:57] – ebaer | ex:htb:updown:start [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== UpDown ====== | ||
| - | |||
| - | ===== NMAP ===== | ||
| - | |||
| - | < | ||
| - | nmap -sS 10.129.57.148 | ||
| - | Starting Nmap 7.92 ( https:// | ||
| - | Nmap scan report for 10.129.57.148 | ||
| - | Host is up (0.087s latency). | ||
| - | Not shown: 998 closed tcp ports (reset) | ||
| - | PORT STATE SERVICE | ||
| - | 22/tcp open ssh | ||
| - | 80/tcp open http | ||
| - | |||
| - | Nmap done: 1 IP address (1 host up) scanned in 8.19 seconds | ||
| - | |||
| - | </ | ||
| - | |||
| - | < | ||
| - | nmap -A 10.129.57.148 | ||
| - | Starting Nmap 7.92 ( https:// | ||
| - | Nmap scan report for 10.129.57.148 | ||
| - | Host is up (0.023s latency). | ||
| - | Not shown: 998 closed tcp ports (reset) | ||
| - | PORT STATE SERVICE VERSION | ||
| - | 22/tcp open ssh | ||
| - | | ssh-hostkey: | ||
| - | | 3072 9e: | ||
| - | | 256 c2: | ||
| - | |_ 256 5f: | ||
| - | 80/tcp open http Apache httpd 2.4.41 ((Ubuntu)) | ||
| - | |_http-title: | ||
| - | |_http-server-header: | ||
| - | </ | ||
| - | |||
| - | ===== Port 80 ===== | ||
| - | |||
| - | {{: | ||
| - | |||
| - | ==== Gobuster ==== | ||
| - | |||
| - | < | ||
| - | gobuster dir -u http:// | ||
| - | =============================================================== | ||
| - | Gobuster v3.1.0 | ||
| - | by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart) | ||
| - | =============================================================== | ||
| - | [+] Url: | ||
| - | [+] Method: | ||
| - | [+] Threads: | ||
| - | [+] Wordlist: | ||
| - | [+] Negative Status codes: | ||
| - | [+] User Agent: | ||
| - | [+] Timeout: | ||
| - | =============================================================== | ||
| - | 2023/01/01 09:30:27 Starting gobuster in directory enumeration mode | ||
| - | =============================================================== | ||
| - | /.hta | ||
| - | / | ||
| - | / | ||
| - | /dev (Status: 301) [Size: 312] [--> http:// | ||
| - | / | ||
| - | / | ||
| - | |||
| - | =============================================================== | ||
| - | 2023/01/01 09:30:40 Finished | ||
| - | =============================================================== | ||
| - | |||
| - | gobuster dir -u http:// | ||
| - | =============================================================== | ||
| - | Gobuster v3.1.0 | ||
| - | by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart) | ||
| - | =============================================================== | ||
| - | [+] Url: | ||
| - | [+] Method: | ||
| - | [+] Threads: | ||
| - | [+] Wordlist: | ||
| - | [+] Negative Status codes: | ||
| - | [+] User Agent: | ||
| - | [+] Timeout: | ||
| - | =============================================================== | ||
| - | 2023/01/01 09:33:19 Starting gobuster in directory enumeration mode | ||
| - | =============================================================== | ||
| - | / | ||
| - | / | ||
| - | /.hta | ||
| - | / | ||
| - | / | ||
| - | |||
| - | =============================================================== | ||
| - | 2023/01/01 09:33:30 Finished | ||
| - | =============================================================== | ||
| - | |||
| - | </ | ||
| - | |||
| - | ====== Git ====== | ||
| - | |||
| - | < | ||
| - | git clone https:// | ||
| - | cd git-dumper | ||
| - | pip3 install -r requirements.txt | ||
| - | ./ | ||
| - | |||
| - | </ | ||
| - | |||
| - | <file php index.php> | ||
| - | < | ||
| - | <br> | ||
| - | <a href="? | ||
| - | <?php | ||
| - | define(" | ||
| - | $page=$_GET[' | ||
| - | if($page && !preg_match("/ | ||
| - | include($_GET[' | ||
| - | }else{ | ||
| - | include(" | ||
| - | } | ||
| - | ?> | ||
| - | |||
| - | </ | ||
| - | |||
| - | <file php checker.php> | ||
| - | <?php | ||
| - | if(DIRECTACCESS){ | ||
| - | die(" | ||
| - | } | ||
| - | ?> | ||
| - | < | ||
| - | < | ||
| - | |||
| - | < | ||
| - | <meta charset=' | ||
| - | <meta http-equiv=" | ||
| - | <link rel=" | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | |||
| - | <div id=" | ||
| - | <header class=" | ||
| - | <h1 id=" | ||
| - | <h2 id=" | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | <div id=" | ||
| - | <section id=" | ||
| - | <form method=" | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | <?php | ||
| - | |||
| - | function isitup($url){ | ||
| - | $ch=curl_init(); | ||
| - | curl_setopt($ch, | ||
| - | curl_setopt($ch, | ||
| - | curl_setopt($ch, | ||
| - | curl_setopt($ch, | ||
| - | curl_setopt($ch, | ||
| - | curl_setopt($ch, | ||
| - | curl_setopt($ch, | ||
| - | curl_setopt($ch, | ||
| - | $f = curl_exec($ch); | ||
| - | $header = curl_getinfo($ch); | ||
| - | if($f AND $header[' | ||
| - | return array(true, | ||
| - | }else{ | ||
| - | return false; | ||
| - | } | ||
| - | curl_close($ch); | ||
| - | } | ||
| - | |||
| - | if($_POST[' | ||
| - | | ||
| - | # File size must be less than 10kb. | ||
| - | if ($_FILES[' | ||
| - | die(" | ||
| - | } | ||
| - | $file = $_FILES[' | ||
| - | |||
| - | # Check if extension is allowed. | ||
| - | $ext = getExtension($file); | ||
| - | if(preg_match("/ | ||
| - | die(" | ||
| - | } | ||
| - | | ||
| - | # Create directory to upload our file. | ||
| - | $dir = " | ||
| - | if(!is_dir($dir)){ | ||
| - | mkdir($dir, 0770, true); | ||
| - | } | ||
| - | | ||
| - | # Upload the file. | ||
| - | $final_path = $dir.$file; | ||
| - | move_uploaded_file($_FILES[' | ||
| - | |||
| - | # Read the uploaded file. | ||
| - | $websites = explode(" | ||
| - | |||
| - | foreach($websites as $site){ | ||
| - | $site=trim($site); | ||
| - | if(!preg_match("# | ||
| - | $check=isitup($site); | ||
| - | if($check){ | ||
| - | echo "< | ||
| - | }else{ | ||
| - | echo "< | ||
| - | } | ||
| - | }else{ | ||
| - | echo "< | ||
| - | } | ||
| - | } | ||
| - | |||
| - | # Delete the uploaded file. | ||
| - | @unlink($final_path); | ||
| - | } | ||
| - | |||
| - | function getExtension($file) { | ||
| - | $extension = strrpos($file," | ||
| - | return ($extension===false) ? "" | ||
| - | } | ||
| - | ?> | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | <div id=" | ||
| - | <footer class=" | ||
| - | <p class=" | ||
| - | <a class=" | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | </ | ||
| - | </ | ||
| - | |||
| - | </ | ||
| - | |||
| - | <file php admin.php> | ||
| - | <?php | ||
| - | if(DIRECTACCESS){ | ||
| - | die(" | ||
| - | } | ||
| - | |||
| - | #ToDo | ||
| - | ?> | ||
| - | </ | ||
| - | |||
| - | <file bash .htaccess> | ||
| - | SetEnvIfNoCase Special-Dev " | ||
| - | Order Deny,Allow | ||
| - | Deny from All | ||
| - | Allow from env=Required-Header | ||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | ====== Exp Attempt1 ====== | ||
| - | |||
| - | < | ||
| - | curl -d @ws.phpn http:// | ||
| - | |||
| - | </ | ||
| - | |||
ex/htb/updown/start.1672588631.txt.gz · Last modified: 2023/01/01 16:57 by ebaer
