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

No comments: