보안 관련 질문입니다..

na_yu의 이미지

보안 쪽에 대해서는 정말 문외한 수준인데요..
굳이 외부에서 들어오는 해킹 말고라도,
계정이 있는 사람이 행할 가능성이 있는 조작 같은게 뭐가 있나요??

이런 곳에서 이런 질문 올리면, 괜히 달리는 답글 보고 해킹 안하던 사람도 호기심에 한번 해 볼수 있을 수도 있다는 걱정이 되기도 하지만..

정 그렇다면 방지하는 방법이라도..
갈켜 주시면 감사하겠습니다..

havebeen의 이미지

쓸데없는 setuid gid가 붙은 프로그램들은 검색하신후에

퍼미션을 없애주시구요 su 같은 프로그램은

wheel에다가 su를 써야되는 사용자만 등록시키신후에

퍼미션을 4700으로 주시구요

일반적인 프로그램들의 퍼미션도 변경해주세요.

chmod 4700 /bin/su
chmod 700 /etc/exports
chmod 700 /etc/fstab
chmod 700 /usr/bin/chage
chmod 700 /usr/bin/wall
chmod 755 /usr/bin/man
chmod 700 /usr/bin/chfn
chmod 700 /usr/bin/write
chmod 700 /usr/sbin/usernetctl
chmod 700 /bin/mount
chmod 700 /bin/umount
chmod 700 /sbin/netreport
chmod 700 /usr/bin/last
chmod 700 /usr/bin/lastlog
chmod 700 /usr/bin/gcc
chmod 700 /usr/bin/make



chmod 750 /bin/ps
chmod 750 /bin/netstat
chmod 750 /bin/dmesg
chmod 750 /bin/df
chmod 750 /usr/bin/who
chmod 750 /usr/bin/finger
chmod 750 /usr/bin/last
chmod 750 /usr/bin/top
chmod 750 /usr/bin/w

chgrp wheel /bin/ps
chgrp wheel /bin/netstat
chgrp wheel /bin/dmesg
chgrp wheel /bin/df
chgrp wheel /usr/bin/w
chgrp wheel /usr/bin/who
chgrp wheel /usr/bin/finger
chgrp wheel /usr/bin/last
chgrp wheel /usr/bin/top
chgrp wheel /bin/su

chmod 701 /home
chmod 110 /usr/bin/top
chmod 550 /bin/ps
chmod 110 /usr/bin/uptime
chmod 110 /usr/sbin/useradd
chmod 110 /usr/sbin/userdel
chmod 110 /usr/bin/last
chmod 110 /usr/bin/find
chmod 751 /var/named
chmod 600 /usr/local/apache/conf/httpd.conf 

계정이 있는 상태에서 해킹을 시도 하는건 제일먼저

익스플로잇 코드를 컴파일 하는 일이 될 것입니다.

익스플로잇 코드라는건 해당 서버의 OS나 데몬에 대하여

버그나 취약점이 발생했을때 해커들이 누구든지 컴파일하여

실행할수 있도록 만들어 놓은 코드 입니다.

시큐리티 포커스나 패킷스톰 같은곳에서 누구든지

다운로드 할 수가 있습니다.

따라서 gcc가 작동하게 되면 익스플로잇 코드는 컴파일 되어

root나 nobody의 권한을 얻게 될지도 모릅니다.

gcc의 퍼미션을 막아주시구요 make도 막아두시면 좋지요..

서버 보안에서 가장 중요한건 해당 데몬의 취약점이나 커널 버그

해당 OS버그 취약점 등을 빨리 빨리 알아내어 취약점 패치를 해주는 것

이라고 생각합니다.

그럼 도움이 되셨기를..

아직 멀었다.. 난 여전히 시작점

익명 사용자의 이미지

일반 사용자로 로컬 접속했을 때 아무 권한 없이도 fork 폭탄을 써서 시스템을 반응 불능 상태로 만들 수 있습니다(모든 사용자들의 키보드/마우스 먹통 현상). 방법도 아주 쉽고, 리눅스, *BSD 전부 속절없이 당합니다. 아마 다른 유닉스들도 마찬가지일 겁니다. 알려진 해결책은 신뢰할 수 없는 사람에게는 아예 셸 계정을 주지 않는 것입니다.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.