1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import unittest.mock as mock
- import ID2TLib.TestLibrary as Lib
- import Test.ID2TAttackTest as Test
- class MemoryTests(Test.ID2TAttackTest):
- def test_SMBLoris(self):
- self.memory_test([['SMBLorisAttack']])
- def test_SMBScanself(self):
- self.memory_test([['SMBScanAttack']])
- @mock.patch('ID2TLib.Utility.get_rnd_bytes', side_effect=Lib.get_bytes)
- @mock.patch('ID2TLib.Utility.get_rnd_x86_nop', side_effect=Lib.get_x86_nop)
- def test_FTPExploit(self, mock_get_rnd_x86_nop, mock_get_rnd_bytes):
- self.memory_test([['FTPWinaXeExploit', 'ip.src=192.168.178.1', 'ip.dst=192.168.178.10']])
- def test_PortscanAttack(self):
- self.memory_test([['PortscanAttack', 'ip.src=192.168.178.1']])
- def test_SQLi(self):
- self.memory_test([['SQLiAttack', 'ip.dst=192.168.0.1']])
- def test_Joomla(self):
- self.memory_test([['JoomlaRegPrivExploit', 'ip.src=192.168.178.1']])
- def test_SalityBotnet(self):
- self.memory_test([['SalityBotnet']])
- @mock.patch('Attack.BaseAttack.BaseAttack.write_attack_pcap', side_effect=Lib.write_attack_pcap)
- def test_DDoS(self, mock_write_attack_pcap):
- self.memory_test([['DDoSAttack']])
- def test_EternalBlue(self):
- self.memory_test([['EternalBlueExploit']])
- def test_MS17Scan(self):
- self.memory_test([['MS17ScanAttack']])
|