root/library/trunk/README

Revision 473, 19.1 kB (checked in by common, 3 years ago)

library
- svn copied all required files from nepenthes trunk

  • Property svn:keywords set to id rev
Line 
1                 Nepenthes
2         - the finest collection -
3
4
5 Our documentation and installation instructions is available online at
6
7         http://nepenthes.sourceforge.net/documentation:readme
8
9
10
11 ( if you are offline and need a README file scroll down, there is a paste of the online version )
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52                 Nepenthes
53         - the finest collection -
54
55
56 IMPORTANT NOTE
57 the same README in a better readable format can be found on
58 http://nepenthes.sourceforge.net/documentation:readme
59 not to mention the online doc is updatet more often.
60
61
62
63
64
65 Table of Contents
66        
67 # 1. What is Nepenthes?
68 # 2. How does Nepenthes work?
69
70     * 2.1 Why would one want to run Nepenthes?
71
72 # 3. Installing Nepenthes
73
74     * resolving depencies
75           o Debian
76           o SuSE
77     * compiling the source
78     * run it
79
80 # 4. Current Status
81
82     * 4.1 Nepenthes core
83           o 4.1.1 Config File
84           o 4.1.2 SocketManager
85           o 4.1.3 ShellcodeManager
86           o 4.1.4 SubmitManager
87           o 4.1.5 EventManager
88           o 4.1.6 LuaInterface
89           o 4.1.7 ModuleManager
90           o 4.1.8 DNSManager
91           o 4.1.9 GeoLocationManager
92     * 4.2 Nepenthes Modules
93           o 4.2.1 download handler
94           o 4.2.2 submit Handler
95           o 4.2.3 shellcode handler
96           o 4.2.4 vulnerability modules
97           o 4.2.5 ShellEmulation modules
98           o 4.2.6 eXample modules
99           o 4.2.7 GeoLocationHandler
100           o 4.2.8 DNSHandler
101
102 # 5. Modules Interface
103 # 6. Contribute to Nepenthes
104 # 7: Trouble Shooting
105 # 8. FAQ
106
107
108
109
110 1. What is Nepenthes?
111
112 Nepenthes is a low interaction honeypot like honeyd or mwcollect. Low Interaction Honeypots emulate _known_ vulnerabilities to collect information about potential attacks. Nepenthes is designed to emulate vulnerabilties worms use to spread, and to capture these worms. As there are many possible ways for worms to spread, Nepenthes is modular. There are module interface to
113
114     * resolve dns asynchronous
115     * emulate vulnerabilities
116     * download files
117     * submit the downloaded files
118     * trigger events (sounds abstract and it is abstract but is still quite useful)
119     * shellcode handler
120
121 Refer to FIXME for more information about the Module Interface.
122
123
124 2. How does Nepenthes work?
125
126 Nepenthes vulnerability modules require knowledge about weaknesses so one can draft a Dialogue how the virus will exploit the weakness, gain the needed information to download the file and send the attacker just enough information he does not notice he gets fooled.
127 On the other hand Nepenthes is quite usefull to capture new exploits for old vulnerabilities.
128 As Nepenthes does not know these exploits, they will appear in the logfiles.
129 By running these captures against a real vulnerable machine one can gain new information about the exploit and start writing an Nepenthes Dialogue.
130 2.1 Why would one want to run Nepenthes?
131
132 The first argument is, its free. The software is free, the viruses you can capture are free. You can collect this annoying stuff like stamps without paying a diam. The rest of the arguments are security related an discussable. Setting up a host running Nepenthes can improve network security drastically, as you can see who scans for which known vulnerabilities.
133
134
135 3. Installing Nepenthes
136
137 Nepenthes will use automake to verify your system satisfies the needed depencies.
138
139     * g++ (use 3.3.* do not use g++ 4.0.* it wont work properly))
140     * libcurl
141     * libmagic
142     * libpcre
143     * libadns
144
145 resolving depencies
146 Debian
147
148 On debian just do
149
150 apt-get install libcurl3-dev
151 apt-get install libmagic-dev
152 apt-get install libpcre3-dev
153 apt-get install libadns1-dev
154
155 or ( paste it in one line )
156
157 apt-get install  libcurl3-dev libmagic-dev libpcre3-dev libadns1-dev
158
159 SuSE
160
161 SuSE needs you to
162
163 apt-get install libadns
164 apt-get install libadns-devel 
165 apt-get install file-devel
166
167 FIXME i dont know suse\u2019s name for libpcre3-dev.
168 compiling the source
169
170 Unpack your source tarball.
171
172  
173 tar vxjf nepenthes-VERSION.tar.bz2
174 ./configure --prefix=/opt/nepenthes
175 make
176 make install
177
178 cd /opt/nepenthes
179
180 less etc/nepenthes/nepenthes.conf
181
182 less etc/nepenthes/submit-norman.conf
183
184 less etc/nepenthes/log-irc.conf
185
186 \u2019less\u2019 means you should have a look in the config file, and edit it using an editor of your choice.
187
188 If something fails, check the Trouble Shooting section. Compiling nepenthes can take some time, here it takes 1:20 minutes on an amd64 3500 cpu with one gb ram.
189 run it
190
191 If everything went fine, run nepenthes.
192
193 bin/nepenthes
194
195
196 4. Current Status
197
198 All in all Nepenthes is stable code,
199 but some things are ... lets say a little raw
200 Current status is everything which is marked \u201cwork\u201ding runs fine.
201 4.1 Nepenthes core
202
203
204 4.1.1 Config File
205
206 actually we have no configfile format fitting our needs yet, so we just use a dummy config file storing the needed data.
207 this will change
208
209
210 4.1.2 SocketManager
211
212 TCPSockets are considered stable.
213 UDPSockets work, they serve in a vuln module
214 FILESockets just an attempt to write a Socket listening on /dev/urandom, useless in the wild, useful for debugging
215 RAWSockets are on the roadmap, even though i consider them useless, i like raw sockets
216
217
218 4.1.3 ShellcodeManager
219
220 register & unregister shellcodehandler works
221 handling shellcodes works
222
223
224 4.1.4 SubmitManager
225
226 register & unregister submithandler works
227 submitting files works
228
229
230 4.1.5 EventManager
231
232 Haven\u2019t used that much till now, but this works fine.
233 have to setup events for errors and other stuff, so this actually gets used.
234
235
236 4.1.6 LuaInterface
237
238 no problems yet, as there is no code.
239
240
241 4.1.7 ModuleManager
242
243 loading & unloading modules works
244 at the moment there is no option like loading and unloading modules at runtime,
245 as this has many problems.
246 time will tell if we need it, time will tell if we support it
247
248
249 4.1.8 DNSManager
250
251 resolving dns asynchron works
252 currently libadns is used, but we are just waiting for udns hitting debian package management.
253
254
255 4.1.9 GeoLocationManager
256
257 I guess i got to explain what this thing does. In all, it does nothing by itself, as it is a \u2018Manager\u2019. In order to provide usefull information to visualize the collected data, we have to resolve attacking ip addresses to their location. Thats this buddies job, we give him a simple ip, and get
258
259 * country * city * longitude/latitude
260
261 But he does not resolve his own, he\u2019s got GetLocationHandlers for this job, he just manages the attached handler.
262
263 Why such complex solution for such easy task?
264
265 There is are really less ip to location resolving services/libraries around there.
266
267     * GeoBytes commercial, no usefull api doc around
268     * MaxMind GeoIP commercial, great api doc, accurate
269     * ip2location commercial, no usefull api doc around
270     * hostip free, but less accurate than the commercial brothers.
271
272 As we did not want to rely on commercial software, we choosed hostip as service, but as we wanted to offer the possibilty to use MaxMinds GeoIP as well, we wrote this modular.
273
274 We could have installed the hostip database on our server as well, and do the whole thing serverside, but as you might have noticed we are hosted on sourceforge.net and the hostip.info database is 300mb in size.
275
276 We could have bought MaxMind\u2019s GeoIP and run the stuff serverside, but a license is quite expensive (370$) and so long we did not make any money with this project.
277
278 So we decided to run the geolocation lookup clientside, offering a free service (hostip), and the best service availible(geoip).
279
280
281 4.2 Nepenthes Modules
282
283
284 4.2.1 download handler
285
286
287 4.2.1.1 download-csend
288
289 status: works
290
291     * registers:
292           o downloadhandler:
293                 + csend protocoll
294
295 description: downloads files csend. csend is streaming a file on a port like netcat can do
296
297 link: download_csend
298
299
300 4.2.1.2 download-curl
301
302 status: works
303
304     * registers:
305           o downloadhandler:
306                 + ftp protocoll
307                 + http protocoll
308
309 description: downloads files via http or ftp
310
311 link: download_curl
312
313
314 4.2.1.3 download-tftp
315
316 status: works
317
318     * registers
319           o downloadhandler
320                 + tftp protocoll
321
322 description: downloads files via the tftp protocoll.
323
324 link: download_tftp
325
326
327 4.2.1.3 download-nepenthes
328
329 status: works
330
331 description: receive virus files from other nepenthes nodes
332
333 link: download_nepenthes
334
335
336 4.2.1.4 download-ftp
337
338 status: works
339
340     * registers
341           o downloadhandler
342                 + ftp protocoll
343
344 description: downloads files via the ftp protocoll.
345
346 link: download_ftp
347
348
349 4.2.2 submit Handler
350
351
352 4.2.2.1 submit-file
353
354 status: works
355
356     * registers:
357           o submithandler:
358           o submit-file
359
360 description:
361 writes captured viri to /tmp/ with their md5 hash as name
362
363 link: submit_file
364
365
366 4.2.2.2 submit-norman
367
368 status: works
369
370     * registers:
371           o submithandler:
372                 + submit-norman
373
374 description:
375 commit files to sandbox.norman.no and get a analysis report via mail
376
377 link: submit_norman
378
379
380 4.2.2.2 submit-nepenthes
381
382 status: works
383
384     * registers:
385           o submithandler:
386                 + submit-nepenthes
387
388 description:
389 commits files to our global nepenthes server to create a greate malware archieve.
390
391 link: submit_nepenthes
392
393
394 4.2.2.3 submit-postgres
395
396 status: works
397
398     * registers:
399           o submithandler:
400                 + submit-postgres
401
402 description:
403 sends the file to a postgres database, so you can see how often a file comes in
404
405 link: submit_postgres
406
407
408 4.2.3 shellcode handler
409
410
411 4.2.3.1 shellcode-generic
412
413 status: works
414
415     * registers:
416           o shellcodehandler:
417                 + sch_generic_createprocess
418                 + sch_generic_url
419                 + sch_generic_xor
420                 + sch_generic_linkxor
421                 + sch_generic_stuttgart
422                 + sch_generic_link_trans
423                 + sch_generic_link_bind_trans
424
425 description: provides some more or less generic shellcodehandlers
426
427
428 4.2.4 vulnerability modules
429
430
431 4.2.4.1 vuln-bagle
432
433 status: should work/untested
434 port: 2745
435
436 description:
437 emulates the bagle backdoor
438
439 link: vuln_bagle
440
441
442 4.2.4.2 vuln-dcom
443
444 status: works
445 port: 135,445,1025
446 default: unsure
447
448     * registers:
449           o shellcodehandler:
450                 + sch_dcom_oc192 (oc192 dcom exploit as used by msblaster)
451                 + sch_dcom_sol2k (sol2k dcom exploit)
452
453 description:
454 emulates the dcom vulnerabilty.
455
456 link: vuln_dcom
457
458
459 4.2.4.3 vuln-kuang2
460
461 status: unknown/untested
462
463 description:
464 we need a virus scanning for kuang2 or a kuang2 client&server to verfiy the code
465
466 link: vuln_kuang2
467
468
469 4.2.4.4 vuln-mydoom
470
471 status: works
472 port: 3127
473 default: assigns
474
475 description:
476 this module emulates the mydoom backdoor, after receiving an special key the file is streamed on the same socket the module receives the file, and if the transferr was successfull the files gets submitted.
477
478
479 4.2.4.5 vuln-optix
480
481 status: unknown/untested
482
483 description:
484 we need a virus scanning for optix or a optix client&server to verfiy the code
485
486 link: vuln_optix
487
488
489 4.2.4.6 vuln-sub7
490
491 status: unknown/untested
492
493 description:
494 we need a virus scanning for sub7 or a sub7 client&server to verfiy the code
495
496 link: vuln_sub7
497
498
499 4.2.4.7 vuln-wins
500
501 status: works
502 port: 42
503 default: assigns
504
505     * registers:
506           o shellcodehandler:
507                 + sch_wins_hs (hatsquad wins exploit)
508                 + sch_wins_zuc (zuc wins exploit)
509
510 description:
511 emulates the wins vulnerabiltiy
512
513 link: vuln_wins
514
515
516 4.2.4.7 vuln-lsass
517
518 status: works
519 port: 445
520 default: assigns
521
522     * registers:
523           o shellcodehandler:
524                 + sch_lsass_hod (house of dabus lsass explois)
525
526 description:
527 emulates the lsass vulnerabiltiy
528
529 link: vuln_lsass
530
531
532 4.2.4.8 vuln-asn1
533
534 status: works partially
535 port: 80 & 445
536 default: assigns
537
538     * registers:
539           o shellcodehandler:
540                 + sch_asn1_smb
541                 + sch_asn1_iis
542
543 description:
544 weak asn1 emulation for smb & iis, there are no shellcodehandlers as ... the exploit i looked up was static
545
546 link: vuln_asn1
547
548
549 4.2.4.9 vuln-mssql
550
551 status: works partially
552 port: 1434 udp
553 default: assigns
554
555     * registers:
556           o shellcodehandler:
557                 + none
558
559 description:
560 for now i only saw sql slammer on this this module coming in :\
561
562 link: vuln_mssql
563
564
565 4.2.4.10 vuln-netdde
566
567 status: untested, should work
568 port: -
569 default: assigns
570
571     * registers:
572           o shellcodehandler:
573                 + sch_netdde_hod
574
575 description:
576 FIXME
577
578 link: vuln_netdde
579
580
581 4.2.4.11 vuln-netbiosname
582
583 status: works partially
584 port: tcp/139
585 default: assigns
586
587 description:
588 replies netbiosnames on valid requests
589
590 link: vuln_netbiosname
591
592
593 4.2.4.12 vuln-upnp
594
595 status: untested, should work
596 port: tcp/5000
597 default: assigns
598
599 description:
600 as we have the generic shellcode handlers, this dialogue should work
601
602 link: vuln_upnp
603
604
605 4.2.4.13 vuln-msmq
606
607 status: untested, should work
608 port: tcp/?
609 default: assigns
610
611     * registers
612           o shellcodehandler
613                 + sch_msmq_hod
614
615 description:
616 handles the MSMQ bug found in 2005
617
618 link: vuln_msmq
619
620
621 4.2.4.14 vuln-iis
622
623 status: untested, should work
624 port: tcp/80,443
625 default: assigns
626
627     * registers
628           o shellcodehandler
629                 + sch_iis_thc
630
631 description:
632 handles some different bugs in m$ iis5
633
634 link: vuln_iis
635
636
637 4.2.4.15 vuln-sasserftpd
638
639 status: untested, should work
640 port: tcp/5554,1023
641 default: assigns
642
643     * registers
644           o shellcodehandler
645                 + sch_sasserftpd_mandragore
646
647 description:
648 handles bug in sasserftp
649
650 link: vuln_sasserftpd
651
652
653 4.2.5 ShellEmulation modules
654
655
656 4.2.5.1 shellemu-winnt
657
658 status: works
659
660 description:
661 provides a windows nt shell supporting all commands one needs to download a file.
662
663
664 4.2.6 eXample modules
665
666
667 4.2.6.1 x-1
668
669 status: works
670
671 link: eXample 1
672
673
674 4.2.6.2 x-2
675
676 status: works
677
678 link: eXample 2
679
680
681 4.2.6.3 x-3
682
683 status: works
684
685 link: eXample 3
686
687
688 4.2.6.4 x-4
689
690 status: works
691
692 link: eXample 4
693
694
695 4.2.6.5 x-5
696
697 status: works
698
699 link: eXample 5
700
701
702 4.2.6.6 x-6
703
704 status: works
705
706 link: eXample 6
707
708
709 4.2.6.7 x-7
710
711 status: work in progess
712
713 link: eXample 7
714
715
716 4.2.7 GeoLocationHandler
717
718
719 4.2.7.1 geolocation-hostip
720
721 status: works Uses http://www.hostip.info to resolve an ip address to a location. link: geolocation-hostip
722
723
724 4.2.7.2 geolocation-geoip
725
726 status: should work Uses http://www.maxmind.com GeoIP to an ip address to a location. link: geolocation-geoip
727
728
729 4.2.8 DNSHandler
730
731
732 4.2.8.1 dnsresolve-adns
733
734 status: works Uses adns to resolve an domain to the ip(s).
735 link: dnsresolve_adns
736
737
738 5. Modules Interface
739
740 Refer to the online doxygen documentation of the eXample modules on FIXME.
741
742
743 6. Contribute to Nepenthes
744
745 Post suggestions, bugs, patches, new modules to nepenthes.sf.net or mail them to nepenthesdev@gmail.com
746 If you want to donate hardware, ipranges, whatever, mail us.
747
748
749 7: Trouble Shooting
750
751
752 7.1
753
754 P: It does not work!
755 S: find out why it does not work
756
757 7.2
758
759 P: the makefiles suck
760 S: send us a patch using the auto(conf|make) foobar we are unable to use.
761
762 7.3
763
764 P: compiling fails
765 S: google for it, if this does not help out, file a bugreport and mention your
766     - operating system version
767     - g++ version
768     - libcurl version
769     - libpcre version
770     - libmagic version
771    and paste the compilererror too.
772
773 7.4
774
775 P: nepenthes leaks memory
776 S: first verify it _is_ a memoryleak
777    currently all files downloaded are kept in memory until they are downloaded and submittet.
778    then
779    run nepenthes with     
780    valgrind --num-callers=12 --tool=memcheck --leak-check=yes --leak-resolution=high --show-reachable=yes -v  --logfile=valg bin/nepenthes
781    and mail us the valgrind logfiles to nepenthesdev@gmail.com
782    or
783    fix the memleak and post the patch to http://sf.net/projects/nepenthes
784
785 7.5
786
787 P: i dont have any connection incoming!
788 S: verify you are not firewalled.     
789
790 8. FAQ
791 8.0
792
793 Q: Is this the official FAQ?
794 A: Yes.
795
796 8.1
797
798 Q: Why choose Nepenthes as the name?
799 A: read http://en.wikipedia.org/wiki/Nepenthes
800
801 8.2
802
803 Q: What do you do with the samples committed to the nepenthes central server?
804 A: We collect them.
805    All samples are committed to clamav.
806    Some samples get analysed.
807
808 8.3
809
810 Q: Can I get access to your malware database?
811 A: In general No.
812    If you think you will be able to persuade us that you should have access as you are an AV product vendor,
813    or do research in this field, mail us at nepenthesdev@users.sourceforge.net
814    Currently we _lack_ hardware and connection for a central server.
815
816 8.4
817
818 Q: I want to write my own modules, will you publish them?
819 A: Depends. If the module adds new features
820    - shellcodehandler
821    - downloadhandler
822    - submithandler
823    - vulnerability module
824    and you are willing to accept the gpl license, there is a really good chance that we will.
825    Of course, the feature also has to be useful.
826    Submitting files to /dev/null can't be considered a good feature.
827
828 8.5
829
830 Q: Why don't you write the whole documentation in english?
831 A: Although we know our English is poor, we think it's more useful to write poor English
832    than to write good Russian.
833    Send us patches fixing this issue.
834
835 8.6
836
837 Q: is autocommiting files to sandbox.norman.no not a bad idea?
838 A: so far we have committed about 400 files and nobody has complained yet.
839    and we like getting the results via mail.
840
841 8.7
842
843 Q: how can i autocommit to clamav?
844 A: clamav does not want to be the victim of autocommits
845    if you use the submit-nepenthes, our central server will commit the files for you.
846
847 8.8
848
849 Q: how can i see whether the file i submitted to your central server has got a clamav signature?
850 A: wait some time and then scan the file using clamscan
851
852 8.9
853
854 Q: why should i run nepenthes?
855 A: you improve security in various ways which we can discuss over a beer.
856
857 8.10
858
859 Q: there is nothing in the cvs repository on sourceforge.net
860 A: we use svn as we don't like cvs
861
862 8.11
863
864 Q: can i get access to the svn?
865 A: so far no as the svn is 'hosted' on a dialup.
866
867 8.12
868
869 Q: i get
870    Got signal 25
871    Exit 'cause of 25
872 A: signal 25 is SIGFSZE, that means filesize exceeded, and mainly referrs to the logfiles
873    located in log/, rm them, rotate them, just get rid of it, and it will work again, fixed in 0.1.1
874
875 8.13
876
877 Q: my avscanner complains about a virus in the nepenthes source package.
878    like:
879    clamscan nepenthes-0.1.1.tar.gz: Trojan.Downloader.FTP.Gen-4 FOUND
880 A: actually this is not a false positive, but on the other hand it is a false positive ...
881    the tarball contains a file in doc/README.VFS containing wide used batchjobs viri use to download and execute themselves
882    on a remotehost once the gained a shell for documentation purposes.
883    so your virusscanner is cool if he recognizes the file as a virus, but this single file does not make nepenthes a virus.
884    as we dont want to sap av scanners we wont ask them to remove this signature.
885
886    in my opinion the signature is very good, using such av  signature on a snort_inline firewall can stopp attacks in the
887    last state, after successfull exploitation, before infecting the host.
888
889 8.14
890
891 Q: whats the problem with g++ 4.0.1?
892 A: it will compile, and maybe even start, but it will fail if you resolve dns async.
893    for some reason the destructor of list<unsigned long> segfaults the programm.
894    to me this is a g++ 4 bug.
895
896 8.15
897
898 Q: what about OS X, or _any_ other big endian architecture?
899 A: we guess it will compile, but we never had a look on endianess in any shellcodehandler.
900    actually we can't say if it will work on big endian boxes, and as we do not own any big endian machine, we cant debug&fix it.
901    if you want to donate a osx box so we can support big endian, mail us for a delievery address.
902    
903
Note: See TracBrowser for help on using the browser.