From be35cc480fa05d9d52535cdd60f3d2a3eed77fc0 Mon Sep 17 00:00:00 2001 From: Panagiotis Chartas Date: Thu, 16 Feb 2023 17:36:26 +0100 Subject: [PATCH] Added HoaxShell --- js/script.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/js/script.js b/js/script.js index e9d1a41..da6ef86 100644 --- a/js/script.js +++ b/js/script.js @@ -10,6 +10,7 @@ const listenerCommand = document.querySelector("#listener-command"); const reverseShellCommand = document.querySelector("#reverse-shell-command"); const bindShellCommand = document.querySelector("#bind-shell-command"); const msfVenomCommand = document.querySelector("#msfvenom-command"); +const hoaxShellCommand = document.querySelector("#hoaxshell-command"); const FilterType = { 'All': 'all', @@ -54,6 +55,15 @@ encoding: "None" }); }); + +document.querySelector("#hoaxshell-tab").addEventListener("click", () => { + document.querySelector("#hoaxshell-selection").innerHTML = ""; + rsg.setState({ + commandType: CommandType.HoaxShell, + encoding: "None" + }); +}); + var rawLinkButtons = document.querySelectorAll('.raw-listener'); for (const button of rawLinkButtons) { button.addEventListener("click", () => { @@ -93,6 +103,7 @@ const rsg = { ip: query.get('ip') || localStorage.getItem('ip') || '10.10.10.10', port: query.get('port') || localStorage.getItem('port') || 9001, payload: query.get('payload') || localStorage.getItem('payload') || 'windows/x64/meterpreter/reverse_tcp', + payload: query.get('type') || localStorage.getItem('type') || 'cmd-curl', shell: query.get('shell') || localStorage.getItem('shell') || rsgData.shells[0], listener: query.get('listener') || localStorage.getItem('listener') || rsgData.listenerCommands[0][1], encoding: query.get('encoding') || localStorage.getItem('encoding') || 'None', @@ -100,6 +111,7 @@ const rsg = { [CommandType.ReverseShell]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.ReverseShell })[0].name, [CommandType.BindShell]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.BindShell })[0].name, [CommandType.MSFVenom]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.MSFVenom })[0].name, + [CommandType.HoaxShell]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.HoaxShell })[0].name, }, commandType: CommandType.ReverseShell, filter: FilterType.All, @@ -116,6 +128,10 @@ const rsg = { [CommandType.MSFVenom]: { listSelection: '#msfvenom-selection', command: '#msfvenom-command' + }, + [CommandType.HoaxShell]: { + listSelection: '#hoaxshell-selection', + command: '#hoaxshell-command' } }, @@ -169,6 +185,16 @@ const rsg = { }, + getType: () => { + if (rsg.commandType === 'HoaxShell') { + let cmd_name = rsg.getSelectedCommandName(); + return hoaxshell_listener_types[cmd_name]; + } + + return 'cmd-curl' + + }, + generateReverseShellCommand: () => { let command @@ -358,6 +384,7 @@ const rsg = { command = command.replace('{port}', rsg.getPort()) command = command.replace('{ip}', rsg.getIP()) command = command.replace('{payload}', rsg.getPayload()) + command = command.replace('{type}', rsg.getType()) if (rsg.getPort() < 1024) { privilegeWarning.style.visibility = "visible"; @@ -456,6 +483,10 @@ document.querySelector('#copy-msfvenom-command').addEventListener('click', () => rsg.copyToClipboard(msfVenomCommand.innerText) }) +document.querySelector('#copy-hoaxshell-command').addEventListener('click', () => { + rsg.copyToClipboard(hoaxShellCommand.innerText) +}) + var downloadButton = document.querySelectorAll(".download-svg"); for (const Dbutton of downloadButton) { Dbutton.addEventListener("click", () => {