Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2019-6207 — xnu 커널 힙 정보 유출 | Kitploit
도구/GitHubGitHub/maldiohead/cve-2019-6207
Memory ForensicsVulnerability AnalysisExploitationBinary Exploitation
GitHubmaldiohead/cve-2019-6207

CVE-2019-6207

xnu 커널 힙 정보 유출

저장소 보기
69186년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2019-6207

이 취약점은 macOS< 10.14.5 &&ios < 12.2의 샌드박스에서 트리거될 수 있습니다.

이 취약점에 대한 더 자세한 내용을 업데이트하겠습니다.

sysctl_dumpentry에는 힙 정보를 누출할 수 있는 버그가 있습니다.

세부 사항:

1.함수 설명과 같이, sysctl_dumpentry는 sysctl()을 통해 커널 테이블을 덤프하는 데 사용됩니다. 이 함수는 rt_msg2에서 버퍼를 malloc한 다음, rt_msg2는 _MALLOC(M_ZERO 플래그 없이)를 사용하여 메모리를 할당합니다. 그 후 버퍼는 rt_msghdr2 객체로 사용됩니다.

  1. 그러나 rt_msghdr2 객체를 초기화할 때(아래 참조) 구멍이 남습니다. 즉, rtm_inits 변수는 초기화되지 않습니다.

  2. 이 함수는 SYSCTL_OUT을 사용하여 데이터를 사용자 공간으로 복사하므로, 커널 힙 정보 버그가 발생합니다.

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);
}
도구 다운로드