Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
CVE-2019-6207 — xnu kernel heap fuga di informazioni | Kitploit
Strumenti/GitHubGitHub/maldiohead/cve-2019-6207
Memory ForensicsAnalisi delle VulnerabilitàExploitBinary Exploitation
GitHubmaldiohead/cve-2019-6207

CVE-2019-6207

xnu kernel heap fuga di informazioni

Vedi Repository
69186 anni faRevisionato da Kitploit

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

CVE-2019-6207

questa vulnerabilità può essere innescata in sandbox su macOS< 10.14.5 &&ios < 12.2

Aggiornerò con maggiori dettagli su questa vulnerabilità.

C'è un bug in sysctl_dumpentry, che può causare una perdita delle informazioni dell'heap.

Dettagli:

  1. Come da descrizione della funzione, sysctl_dumpentry viene usata per il dump della tabella del kernel tramite sysctl(); questa funzione alloca un buffer in rt_msg2, e poi rt_msg2 usa _MALLOC (senza il flag M_ZERO) per allocare la memoria, dopo di che il buffer viene usato come oggetto rt_msghdr2.

  2. Tuttavia, quando si inizializza l'oggetto rt_msghdr2 (vedi sotto), lascia un buco, il che significa che la variabile rtm_inits non viene inizializzata.

  3. La funzione usa SYSCTL_OUT per copiare i dati nello spazio utente, causando così la perdita di informazioni dell'heap del kernel.

root@kitploit:~
static int sysctl_dumpentry(struct radix_node *rn, void *vw)
{
	struct walkarg *w = vw;
	struct rtentry *rt = (struct rtentry *)rn;
	int error = 0, size;
	struct rt_addrinfo info;
	kauth_cred_t cred;
	kauth_cred_t *credp;

cred = kauth_cred_proc_ref(current_proc());
credp = &cred;

RT_LOCK(rt);
if ((w->w_op == NET_RT_FLAGS || w->w_op == NET_RT_FLAGS_PRIV) &&
    !(rt->rt_flags & w->w_arg))
	goto done;

/*
 * If the matching route has RTF_LLINFO set, then we can skip scrubbing the MAC
 * only if the outgoing interface is not loopback and the process has entitlement
 * for neighbor cache read.
 */
if (w->w_op == NET_RT_FLAGS_PRIV && (rt->rt_flags & RTF_LLINFO)) {
	if (rt->rt_ifp != lo_ifp &&
	    (route_op_entitlement_check(NULL, cred, ROUTE_OP_READ, TRUE) == 0)) {
		credp = NULL;
	}
}

bzero((caddr_t)&info, sizeof (info));
info.rti_info[RTAX_DST] = rt_key(rt);
info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
info.rti_info[RTAX_NETMASK] = rt_mask(rt);
info.rti_info[RTAX_GENMASK] = rt->rt_genmask;

if (w->w_op != NET_RT_DUMP2) {
	size = rt_msg2(RTM_GET, &info, NULL, w, credp); //alloc memory without initial 
	if (w->w_req != NULL && w->w_tmem != NULL) {
		struct rt_msghdr *rtm =
		    (struct rt_msghdr *)(void *)w->w_tmem;

		rtm->rtm_flags = rt->rt_flags;
		rtm->rtm_use = rt->rt_use;
		rt_getmetrics(rt, &rtm->rtm_rmx);
		rtm->rtm_index = rt->rt_ifp->if_index;
		rtm->rtm_pid = 0;
		rtm->rtm_seq = 0;
		rtm->rtm_errno = 0;
		rtm->rtm_addrs = info.rti_addrs;
		error = SYSCTL_OUT(w->w_req, (caddr_t)rtm, size); // copyout
	}
} else {
	size = rt_msg2(RTM_GET2, &info, NULL, w, credp);  // alloc memory without initial
	if (w->w_req != NULL && w->w_tmem != NULL) {
		struct rt_msghdr2 *rtm =
		    (struct rt_msghdr2 *)(void *)w->w_tmem;

		rtm->rtm_flags = rt->rt_flags;
		rtm->rtm_use = rt->rt_use;
		rt_getmetrics(rt, &rtm->rtm_rmx);
		rtm->rtm_index = rt->rt_ifp->if_index;
		rtm->rtm_refcnt = rt->rt_refcnt;
		if (rt->rt_parent)
			rtm->rtm_parentflags = rt->rt_parent->rt_flags;
		else
			rtm->rtm_parentflags = 0;
		rtm->rtm_reserved = 0;
		rtm->rtm_addrs = info.rti_addrs;
		error = SYSCTL_OUT(w->w_req, (caddr_t)rtm, size); // copyout
	}
}


done:
	RT_UNLOCK(rt);
	kauth_cred_unref(&cred);
	return (error);
}
Scarica lo strumento