tests package¶
Submodules¶
tests.test module¶
-
class
tests.test.
Test
(target_honeypot=None)[source]¶ Bases:
object
Interface all Tests must extend from Please inspect this interface and other Tests before you write your own
-
__init__
(target_honeypot=None)[source]¶ Instantiate a new Test
Parameters: target_honeypot – optional target Honeypot (can also be set later)
-
default_description
= 'No description defined for this test'¶
-
default_karma
= 10¶
-
default_name
= 'UnknownName'¶
-
default_report
= 'This test did not provide a report of its findings'¶
-
description
= 'No description defined for this test'¶
-
doc_file
= '_not_found_manual.html'¶
-
doc_online_root
= 'http://checkpot.readthedocs.io/en/master/test_manuals/'¶
-
karma
¶
-
karma_value
= 10¶
-
name
= 'UnknownName'¶
-
report
¶
-
result
¶
-
run
()[source]¶ All tests must implement their own run() method and write docstrings for it. run() should never be called directly, the TestPlatform takes care of all initialisations.
Returns: this method returns nothing, however, before return set_result() should be called
-
set_result
(result=<TestResult.UNKNOWN: 2>, *report)[source]¶ Stores the result and report of this test
Parameters: - result – result of the test
- report – accurate report of findings the test has made
-
target_honeypot
¶
-
tests.test_platform module¶
-
class
tests.test_platform.
TestPlatform
(test_list, target_honeypot)[source]¶ Bases:
object
Holds a list of Tests and a reference to a Honeypot Runs the list of tests on the Honeypot and generates statistics based on the results
-
__init__
(test_list, target_honeypot)[source]¶ Parameters: - test_list – list of Test objects
- target_honeypot – Honeypot object to run Tests against
-
get_stats
()[source]¶ Calculates statistics based on the last scan
Returns: tuple containing number of ok, warnings, unknown
-
results
¶ Returns the results of each test
Returns: list of tuples like (Test Name, Test Report, Test Result)
-
tests.default_ftp module¶
tests.default_http module¶
-
class
tests.default_http.
CertificateValidationTest
(target_honeypot=None)[source]¶ Bases:
tests.test.Test
-
description
= 'Check validity of SSL certificates'¶
-
doc_file
= 'invalid_certificate.html'¶
-
karma_value
= 20¶
-
name
= 'Certificate Validation Test'¶
-
-
class
tests.default_http.
DefaultGlastopfWebsiteTest
(target_honeypot=None)[source]¶ Bases:
tests.test.Test
-
description
= 'Test unchanged source for website content'¶
-
doc_file
= 'default_glastopf_site.html'¶
-
karma_value
= 60¶
-
name
= 'Default Glastopf Website Content Test'¶
-
tests.default_imap module¶
tests.default_smtp module¶
tests.default_telnet module¶
tests.default_templates module¶
tests.direct_fingerprinting module¶
-
class
tests.direct_fingerprinting.
DefaultServiceCombinationTest
(target_honeypot=None)[source]¶ Bases:
tests.test.Test
Check if the running services combination is the default configuration for popular Honeypots
-
default_ports
= {'amun': [21, 23, 25, 42, 80, 105, 110, 135, 139, 143, 443, 445, 554, 587, 617, 1023, 1025, 1080, 1111, 1581, 1900, 2101, 2103, 2105, 2107, 2380, 2555, 2745, 2954, 2967, 2968, 3127, 3128, 3268, 3372, 3389, 3628, 5000, 5168, 5554, 6070, 6101, 6129, 7144, 7547, 8080, 9999, 10203, 27347, 38292, 41523], 'artillery': [21, 22, 25, 53, 110, 1433, 1723, 5800, 5900, 8080, 10000, 16993, 44443], 'dionaea': [21, 42, 80, 135, 443, 445, 1433, 1723, 3306, 5060, 5061], 'honeypy': [7, 8, 23, 24, 2048, 4096, 10007, 10008, 10009, 10010]}¶
-
description
= 'Check if the running services combination is the default configuration for popular Honeypots'¶
-
doc_file
= 'default_service_combination.html'¶
-
karma_value
= 50¶
-
name
= 'Default Service Combination Test'¶
-
run
()[source]¶ Check if the running services combination is the default configuration for popular Honeypots
-
threshold
= 70¶
-
-
class
tests.direct_fingerprinting.
DirectFingerprintTest
(target_honeypot=None)[source]¶ Bases:
tests.test.Test
Check if the nmap scan directly fingerprints any service as a honeypot
-
description
= 'Check if the nmap scan directly fingerprints any service as a honeypot'¶
-
doc_file
= 'direct_fingerprinting.html'¶
-
karma_value
= 100¶
-
name
= 'Direct Fingerprint Test'¶
-
-
class
tests.direct_fingerprinting.
DuplicateServicesCheck
(target_honeypot=None)[source]¶ Bases:
tests.test.Test
Check if the machine is running duplicate services
-
description
= 'Check if the machine is running duplicate services'¶
-
doc_file
= 'duplicate_services.html'¶
-
karma_value
= 30¶
-
name
= 'Duplicate Services Check'¶
-
-
class
tests.direct_fingerprinting.
OSServiceCombinationTest
(target_honeypot=None)[source]¶ Bases:
tests.test.Test
Check if the OS and running services combination makes sense
-
description
= 'Check if the OS and running services combination makes sense'¶
-
doc_file
= 'os_service_combination.html'¶
-
karma_value
= 90¶
-
linux_exclusive
= []¶
-
name
= 'OS Service combination test'¶
-
windows_exclusive
= ['ms-sql', 'iis', 'windows', 'microsoft']¶
-
tests.old_version_bugs module¶
tests.service_implementation module¶
-
class
tests.service_implementation.
HTTPTest
(target_honeypot=None)[source]¶ Bases:
tests.test.Test
Tests HTTP service implementation
-
description
= 'Tests HTTP service implementation'¶
-
doc_file
= 'implementation.html'¶
-
karma_value
= 60¶
-
name
= 'HTTP Test'¶
-