Removed unnecessary comments, unused file, improved parsing of linux requests
This commit is contained in:
parent
e5201a2ecf
commit
d75299be25
|
@ -546,6 +546,42 @@ fullTest.conf is a good config to start, because it covers all machines.
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr class="header">
|
||||||
|
<th><p><span id="_Toc536021463" class="anchor"></span>Nr. <strong>12</strong> Tunneling M4</p>
|
||||||
|
<p>(10.2.0.12)</p></th>
|
||||||
|
<th>(Exploitable)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>OS:</td>
|
||||||
|
<td><strong>Windows server 2019 x64</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>Software:</td>
|
||||||
|
<td>OpenSSL</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>Default service’s port:</td>
|
||||||
|
<td>445</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>Root password:</td>
|
||||||
|
<td>:t67TC5ZD+mz</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>Server’s config:</td>
|
||||||
|
<td>Default</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>Notes:</td>
|
||||||
|
<td>Accessible only trough Nr.10</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="header">
|
<tr class="header">
|
||||||
|
|
|
@ -216,10 +216,6 @@ class InfectionMonkey(object):
|
||||||
|
|
||||||
# if host was exploited, before continue to closing the tunnel ensure the exploited host had its chance to
|
# if host was exploited, before continue to closing the tunnel ensure the exploited host had its chance to
|
||||||
# connect to the tunnel
|
# connect to the tunnel
|
||||||
|
|
||||||
#TODO change back
|
|
||||||
time.sleep(WormConfiguration.keep_tunnel_open_time)
|
|
||||||
|
|
||||||
if len(self._exploited_machines) > 0:
|
if len(self._exploited_machines) > 0:
|
||||||
time_to_sleep = WormConfiguration.keep_tunnel_open_time
|
time_to_sleep = WormConfiguration.keep_tunnel_open_time
|
||||||
LOG.info("Sleeping %d seconds for exploited machines to connect to tunnel", time_to_sleep)
|
LOG.info("Sleeping %d seconds for exploited machines to connect to tunnel", time_to_sleep)
|
||||||
|
|
|
@ -110,11 +110,10 @@ class FileServHTTPRequestHandler(http.server.BaseHTTPRequestHandler):
|
||||||
class HTTPConnectProxyHandler(http.server.BaseHTTPRequestHandler):
|
class HTTPConnectProxyHandler(http.server.BaseHTTPRequestHandler):
|
||||||
timeout = 30 # timeout with clients, set to None not to make persistent connection
|
timeout = 30 # timeout with clients, set to None not to make persistent connection
|
||||||
proxy_via = None # pseudonym of the proxy in Via header, set to None not to modify original Via header
|
proxy_via = None # pseudonym of the proxy in Via header, set to None not to modify original Via header
|
||||||
#protocol_version = "HTTP/1.1"
|
|
||||||
|
|
||||||
def do_POST(self):
|
def do_POST(self):
|
||||||
content_length = int(self.headers['Content-Length']) # <--- Gets the size of data
|
content_length = int(self.headers['Content-Length'])
|
||||||
post_data = self.rfile.read(content_length).decode() # <--- Gets the data itself
|
post_data = self.rfile.read(content_length).decode()
|
||||||
try:
|
try:
|
||||||
r = requests.post(url=self.path, data=post_data)
|
r = requests.post(url=self.path, data=post_data)
|
||||||
except requests.exceptions.ConnectionError as e:
|
except requests.exceptions.ConnectionError as e:
|
||||||
|
|
|
@ -126,10 +126,7 @@ class MonkeyTunnel(Thread):
|
||||||
def run(self):
|
def run(self):
|
||||||
self._broad_sock = _set_multicast_socket(self._timeout)
|
self._broad_sock = _set_multicast_socket(self._timeout)
|
||||||
self.l_ips = local_ips()
|
self.l_ips = local_ips()
|
||||||
|
self.local_port = get_free_tcp_port()
|
||||||
#TODO change back
|
|
||||||
self.local_port = 5002
|
|
||||||
#self.local_port = get_free_tcp_port()
|
|
||||||
|
|
||||||
if not self.local_port:
|
if not self.local_port:
|
||||||
return
|
return
|
||||||
|
|
|
@ -27,9 +27,9 @@ class Bootloader(flask_restful.Resource):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_request_contents_linux(request_data: bytes) -> Dict[str, str]:
|
def get_request_contents_linux(request_data: bytes) -> Dict[str, str]:
|
||||||
parsed_data = json.loads(request_data.decode().replace("\n", "")
|
parsed_data = json.loads(request_data.decode().replace("\"\n", "")
|
||||||
|
.replace("\n", "")
|
||||||
.replace("NAME=\"", "")
|
.replace("NAME=\"", "")
|
||||||
.replace("\"\"", "\"")
|
|
||||||
.replace("\":\",", "\":\"\","))
|
.replace("\":\",", "\":\"\","))
|
||||||
return parsed_data
|
return parsed_data
|
||||||
|
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import PreviewPaneComponent from 'components/map/preview-pane/PreviewPane';
|
|
||||||
|
|
||||||
class PthPreviewPaneComponent extends PreviewPaneComponent {
|
|
||||||
nodeInfo(asset) {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<table className="table table-condensed">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Hostname</th>
|
|
||||||
<td>{asset.hostname}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>IP Addresses</th>
|
|
||||||
<td>{asset.ips.map(val => <div key={val}>{val}</div>)}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Services</th>
|
|
||||||
<td>{asset.services.map(val => <div key={val}>{val}</div>)}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Compromised Users</th>
|
|
||||||
<td>{asset.users.map(val => <div key={val}>{val}</div>)}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
edgeInfo(edge) {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<table className="table table-condensed">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Compromised Users</th>
|
|
||||||
<td>{edge.users.map(val => <div key={val}>{val}</div>)}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
getInfoByProps() {
|
|
||||||
switch (this.props.type) {
|
|
||||||
case 'edge':
|
|
||||||
return this.edgeInfo(this.props.item);
|
|
||||||
case 'node':
|
|
||||||
return this.nodeInfo(this.props.item);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default PthPreviewPaneComponent;
|
|
Loading…
Reference in New Issue