
Monday, October 6, 2008
Tuesday, April 1, 2008
Tuesday, March 25, 2008
Linux Slapper Worm
We have successfully infected a RedHat running Apache with the Slapper Worm.
A fairly detailed description of this worm is at the Symantec website.
http://securityresponse.symantec.com/avcenter/security/Content/2002.09.13.html
In the article it describes the behavior of the worm. It scans /8 subnets looking for an exploit on port 80, searching for the Apache exploit. For example in one of the runs it was scanning the 141.81.1.x subet. It scans 141.81.1.1 sequentially through 141.81.1.255, and then starts on the next subnet, which is 141.81.2.1 - 255.
Once the machine detects a vulnerable machine, it replicates itself and the newly infected machine repeats the process.
A fairly detailed description of this worm is at the Symantec website.
http://securityresponse.symantec.com/avcenter/security/Content/2002.09.13.html
In the article it describes the behavior of the worm. It scans /8 subnets looking for an exploit on port 80, searching for the Apache exploit. For example in one of the runs it was scanning the 141.81.1.x subet. It scans 141.81.1.1 sequentially through 141.81.1.255, and then starts on the next subnet, which is 141.81.2.1 - 255.
Once the machine detects a vulnerable machine, it replicates itself and the newly infected machine repeats the process.
Wednesday, March 5, 2008
McAfee Virus Scan
Tuesday, March 4, 2008
Error from Slapper Code
We have started working with a Linux worm called Slapper. The complete source code written in C is available here
We are compiling it on a RedHat 7.2 computer that has a known vulnerable version of Apache and OpenSSL.
DO NOT ATTEMPT TO COMPILE THE WORM ON AN OPEN NETWORK. We are compiling the worm in a closed lab enviroment, and are careful not to let it loose in the wild (even though it is unlikely to infect anything because the software was patched 5 years ago)
Here is the error of the output when we compile the Slapper code.
.bugtraq.c: In function `abind':
.bugtraq.c:311: warning: comparison between pointer and integer
.bugtraq.c: In function `await':
.bugtraq.c:339: warning: assignment from incompatible pointer type
.bugtraq.c:345: warning: assignment from incompatible pointer type
.bugtraq.c:351: warning: assignment from incompatible pointer type
.bugtraq.c: In function `lowsend':
.bugtraq.c:830: warning: passing arg 1 of `in_cksum' from incompatible pointer type
In file included from /usr/include/openssl/asn1.h:62,
from /usr/include/openssl/objects.h:960,
from /usr/include/openssl/evp.h:129,
from /usr/include/openssl/x509.h:67,
from /usr/include/openssl/ssl.h:69,
from .bugtraq.c:1078:
/usr/include/time.h: At top level:
/usr/include/time.h:166: warning: type mismatch with previous implicit declaration
.bugtraq.c:841: warning: previous implicit declaration of `time'
/usr/include/time.h:166: warning: `time' was previously implicitly declared to return `int'
.bugtraq.c: In function `main':
.bugtraq.c:1854: warning: assignment makes pointer from integer without a cast
.bugtraq.c:1951: warning: passing arg 1 of `in_cksum' from incompatible pointer type
/tmp/ccNfimYp.o: In function `read_ssl_packet':
/tmp/ccNfimYp.o(.text+0x3674): undefined reference to `RC4'
/tmp/ccNfimYp.o: In function `send_ssl_packet':
/tmp/ccNfimYp.o(.text+0x3785): undefined reference to `MD5_Init'
/tmp/ccNfimYp.o(.text+0x379f): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x37b7): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x37d2): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x37ea): undefined reference to `MD5_Final'
/tmp/ccNfimYp.o(.text+0x3832): undefined reference to `RC4'
/tmp/ccNfimYp.o: In function `get_server_hello':
/tmp/ccNfimYp.o(.text+0x3add): undefined reference to `d2i_X509'
/tmp/ccNfimYp.o: In function `send_client_master_key':
/tmp/ccNfimYp.o(.text+0x3c66): undefined reference to `X509_get_pubkey'
/tmp/ccNfimYp.o(.text+0x3cb7): undefined reference to `RSA_public_encrypt'
/tmp/ccNfimYp.o: In function `generate_key_material':
/tmp/ccNfimYp.o(.text+0x3df0): undefined reference to `MD5_Init'
/tmp/ccNfimYp.o(.text+0x3e08): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x3e1d): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x3e3a): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x3e56): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x3e68): undefined reference to `MD5_Final'
/tmp/ccNfimYp.o: In function `generate_session_keys':
/tmp/ccNfimYp.o(.text+0x3ed0): undefined reference to `RC4_set_key'
/tmp/ccNfimYp.o(.text+0x3f0f): undefined reference to `RC4_set_key'
collect2: ld returned 1 exit status
We are compiling it on a RedHat 7.2 computer that has a known vulnerable version of Apache and OpenSSL.
DO NOT ATTEMPT TO COMPILE THE WORM ON AN OPEN NETWORK. We are compiling the worm in a closed lab enviroment, and are careful not to let it loose in the wild (even though it is unlikely to infect anything because the software was patched 5 years ago)
Here is the error of the output when we compile the Slapper code.
.bugtraq.c: In function `abind':
.bugtraq.c:311: warning: comparison between pointer and integer
.bugtraq.c: In function `await':
.bugtraq.c:339: warning: assignment from incompatible pointer type
.bugtraq.c:345: warning: assignment from incompatible pointer type
.bugtraq.c:351: warning: assignment from incompatible pointer type
.bugtraq.c: In function `lowsend':
.bugtraq.c:830: warning: passing arg 1 of `in_cksum' from incompatible pointer type
In file included from /usr/include/openssl/asn1.h:62,
from /usr/include/openssl/objects.h:960,
from /usr/include/openssl/evp.h:129,
from /usr/include/openssl/x509.h:67,
from /usr/include/openssl/ssl.h:69,
from .bugtraq.c:1078:
/usr/include/time.h: At top level:
/usr/include/time.h:166: warning: type mismatch with previous implicit declaration
.bugtraq.c:841: warning: previous implicit declaration of `time'
/usr/include/time.h:166: warning: `time' was previously implicitly declared to return `int'
.bugtraq.c: In function `main':
.bugtraq.c:1854: warning: assignment makes pointer from integer without a cast
.bugtraq.c:1951: warning: passing arg 1 of `in_cksum' from incompatible pointer type
/tmp/ccNfimYp.o: In function `read_ssl_packet':
/tmp/ccNfimYp.o(.text+0x3674): undefined reference to `RC4'
/tmp/ccNfimYp.o: In function `send_ssl_packet':
/tmp/ccNfimYp.o(.text+0x3785): undefined reference to `MD5_Init'
/tmp/ccNfimYp.o(.text+0x379f): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x37b7): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x37d2): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x37ea): undefined reference to `MD5_Final'
/tmp/ccNfimYp.o(.text+0x3832): undefined reference to `RC4'
/tmp/ccNfimYp.o: In function `get_server_hello':
/tmp/ccNfimYp.o(.text+0x3add): undefined reference to `d2i_X509'
/tmp/ccNfimYp.o: In function `send_client_master_key':
/tmp/ccNfimYp.o(.text+0x3c66): undefined reference to `X509_get_pubkey'
/tmp/ccNfimYp.o(.text+0x3cb7): undefined reference to `RSA_public_encrypt'
/tmp/ccNfimYp.o: In function `generate_key_material':
/tmp/ccNfimYp.o(.text+0x3df0): undefined reference to `MD5_Init'
/tmp/ccNfimYp.o(.text+0x3e08): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x3e1d): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x3e3a): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x3e56): undefined reference to `MD5_Update'
/tmp/ccNfimYp.o(.text+0x3e68): undefined reference to `MD5_Final'
/tmp/ccNfimYp.o: In function `generate_session_keys':
/tmp/ccNfimYp.o(.text+0x3ed0): undefined reference to `RC4_set_key'
/tmp/ccNfimYp.o(.text+0x3f0f): undefined reference to `RC4_set_key'
collect2: ld returned 1 exit status
Snort Rule for SQL Slammer
Snort rule for SQL slammer is as follows:
alert udp any any -> 192.168.1.0 1434 \
(msg:”SQL Slammer Infection”; threshold: type threshold, \
track by_dst, count 10, seconds 60; sid:16546854; rev:6; )
It alerts if over 10 packets are sent in 60 seconds.
Another method would be to detect some of the data contents of the SQL Slammer packet, which would be more accurate, and cause less false positives.
alert udp any any -> 192.168.1.0 1434 \
(msg:”SQL Slammer Infection”; threshold: type threshold, \
track by_dst, count 10, seconds 60; sid:16546854; rev:6; )
It alerts if over 10 packets are sent in 60 seconds.
Another method would be to detect some of the data contents of the SQL Slammer packet, which would be more accurate, and cause less false positives.
Sunday, February 24, 2008
Subscribe to:
Posts (Atom)