nmap으로 포트스캔 시 포트스캔 당한 서버에서의 확인법은?

irishubits의 이미지

nmap 으로 특정 사용자가 포트스캔할 시 포트스캔 당하는 쪽에서는 로그가 남는다고 하던데요.(스텔스 기능x시) 어디에 남는 건가요.

warpdory의 이미지

일반적으로는 /var/log/messages 파일이나 /var/log/serure 파일에 저장됩니다.

아래파일은 제가 관리하고 있는 서버 중 한대의 /var/log/secure 파일의 일부입니다.

Quote:

Dec 27 18:57:17 www sshd[22662]: Failed password for illegal user blue from 222.122.13.28 port 37321 ssh2
Dec 27 18:57:17 www sshd[22662]: Received disconnect from 222.122.13.28: 11: Bye Bye
Dec 27 18:57:17 www sshd[22663]: input_userauth_request: illegal user dave
Dec 27 18:57:17 www sshd[22663]: Could not reverse map address 222.122.13.28.
Dec 27 18:57:17 www sshd[22663]: Failed password for illegal user dave from 222.122.13.28 port 37345 ssh2
Dec 27 18:57:17 www sshd[22663]: Received disconnect from 222.122.13.28: 11: Bye Bye
Dec 27 18:57:17 www sshd[22664]: input_userauth_request: illegal user hunter
Dec 27 18:57:17 www sshd[22664]: Could not reverse map address 222.122.13.28.
Dec 27 18:57:17 www sshd[22664]: Failed password for illegal user hunter from 222.122.13.28 port 37362 ssh2
Dec 27 18:57:17 www sshd[22664]: Received disconnect from 222.122.13.28: 11: Bye Bye
Dec 27 18:57:17 www sshd[22665]: input_userauth_request: illegal user sarah
Dec 27 18:57:17 www sshd[22665]: Could not reverse map address 222.122.13.28.
Dec 27 18:57:17 www sshd[22665]: Failed password for illegal user sarah from 222.122.13.28 port 37381 ssh2
Dec 27 18:57:17 www sshd[22665]: Received disconnect from 222.122.13.28: 11: Bye Bye
Dec 27 18:57:17 www sshd[22666]: input_userauth_request: illegal user thursday
Dec 27 18:57:17 www sshd[22666]: Could not reverse map address 222.122.13.28.
Dec 27 18:57:17 www sshd[22666]: Failed password for illegal user thursday from 222.122.13.28 port 37406 ssh2
Dec 27 18:57:17 www sshd[22666]: Received disconnect from 222.122.13.28: 11: Bye Bye
Dec 27 18:57:17 www sshd[22667]: Could not reverse map address 222.122.13.28.
Dec 27 18:57:17 www sshd[22667]: Failed password for root from 222.122.13.28 port 37428 ssh2
Dec 27 18:57:17 www sshd[22667]: Received disconnect from 222.122.13.28: 11: Bye Bye
Dec 27 18:57:17 www sshd[22668]: Could not reverse map address 222.122.13.28.
Dec 27 18:57:17 www sshd[22668]: Failed password for root from 222.122.13.28 port 37452 ssh2
Dec 27 18:57:17 www sshd[22668]: Received disconnect from 222.122.13.28: 11: Bye Bye
Dec 27 18:57:17 www sshd[22669]: Could not reverse map address 222.122.13.28.
Dec 27 18:57:17 www sshd[22669]: Failed password for admin from 222.122.13.28 port 37473 ssh2
Dec 27 18:57:17 www sshd[22669]: Received disconnect from 222.122.13.28: 11: Bye Bye

물론, 저 IP 는 현재 막혔습니다. ^^;

---------
귓가에 햇살을 받으며 석양까지 행복한 여행을...
웃으며 떠나갔던 것처럼 미소를 띠고 돌아와 마침내 평안하기를...
- 엘프의 인사, 드래곤 라자, 이영도

즐겁게 놀아보자.
http://akpil.egloos.com


---------
귓가에 햇살을 받으며 석양까지 행복한 여행을...
웃으며 떠나갔던 것처럼 미소를 띠고 돌아와 마침내 평안하기를...
- 엘프의 인사, 드래곤 라자, 이영도

즐겁게 놀아보자.

Stand Alone Complex의 이미지

이건 nmap의 포트스캔 로그가 아니라 ssh 공격툴의 로그네요.

-
커널 옵션 한글화 프로젝트 - http://option.kernel.pe.kr

RET ;My life :P

RET ;My life :P

warpdory의 이미지

ssh 공격툴의 로그죠.

하지만, 로그에 저런 비슷한 게 남으면 즉 /var/log/messages 또는 /var/log/serure 파일에 저런 식의 로그가 남는다는 얘기죠.

nmap 으로 포트스캔해도 비슷하게 남거든요. 쭉 포트 번호가 증가하면서 한 ip 에서 계속해서 접속하는 로그가 남게 되죠. 그러면 그 ip 를 막아버리면 된다는 얘기입니다. ^^;

---------
귓가에 햇살을 받으며 석양까지 행복한 여행을...
웃으며 떠나갔던 것처럼 미소를 띠고 돌아와 마침내 평안하기를...
- 엘프의 인사, 드래곤 라자, 이영도

즐겁게 놀아보자.
http://akpil.egloos.com


---------
귓가에 햇살을 받으며 석양까지 행복한 여행을...
웃으며 떠나갔던 것처럼 미소를 띠고 돌아와 마침내 평안하기를...
- 엘프의 인사, 드래곤 라자, 이영도

즐겁게 놀아보자.

Stand Alone Complex의 이미지

아무 관련 데몬, 툴 없이 포트 스캔을 확인하시려면 돌리고 있는 데몬들의 접속 로그들을 조합해봐야합니다.

하지만 매우 귀찮은 일이죠?
tcp 포트 스캔시 로그를 남겨주는 scanlogd라는 데몬이 있습니다.
자세한건 아래 주소에서 확인하세요.
http://www.openwall.com/scanlogd/

-
커널 옵션 한글화 프로젝트 - http://option.kernel.pe.kr

RET ;My life :P

RET ;My life :P

댓글 달기

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