Repository: 3gstudent/Smbtouch-Scanner Branch: master Commit: c980f6b2956d Files: 4 Total size: 7.1 KB Directory structure: gitextract_ys15vjru/ ├── LICENSE ├── README.md ├── Smbtouch-1.1.1.xml └── SmbtouchScanner.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: LICENSE ================================================ BSD 3-Clause License Copyright (c) 2017, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: README.md ================================================ # Smbtouch-Scanner Author: 3gstudent License: BSD 3-Clause --- Automatically scan the inner network. Use Smbtouch.exe to detect whether the target is vulnerable. **List of vulnerabilities:** - ETERNALBLUE - ETERNALCHAMPION - ETERNALROMANCE - ETERNALSYNERGY Protocol: SMB Scan port:445 **Note:** You can also use protocl NBT and port 139,just change the Smbtouch-1.1.1.xml You can get Smbtouch.exe from this: https://github.com/x0rz/EQGRP_Lost_in_Translation/blob/master/windows/touches/Smbtouch-1.1.1.exe or https://github.com/fuzzbunch/fuzzbunch/blob/master/touches/Smbtouch-1.1.1.exe More details: https://3gstudent.github.io/%E5%86%85%E7%BD%91%E5%AE%89%E5%85%A8-%E5%88%A9%E7%94%A8NSA-Smbtouch%E6%89%B9%E9%87%8F%E6%A3%80%E6%B5%8B%E5%86%85%E7%BD%91 --- Maybe need to use multithread to improve efficiency. ================================================ FILE: Smbtouch-1.1.1.xml ================================================ 60 127.0.0.1 445 0 1 2 3 4 ================================================ FILE: SmbtouchScanner.py ================================================ # # Smbtouch Scanner # By: 3gstudent # License: BSD 3-Clause ''' Automatically scan the inner network. Use Smbtouch.exe to detect whether the target is vulnerable. Protocol: SMB Scan port:445 Note: You can also use protocl NBT and port 139,just change the Smbtouch-1.1.1.xml You can get Smbtouch.exe from this: https://github.com/x0rz/EQGRP_Lost_in_Translation/blob/master/windows/touches/Smbtouch-1.1.1.exe ''' import os import fileinput #Start IP,change it BeginIP = '192.168.1.1' #End IP,change it EndIP = '192.168.1.10' #Log file fp = open('log.txt', 'w+') OldIP = ' 127.0.0.1' TempIP = OldIP IP1 = BeginIP.split('.')[0] IP2 = BeginIP.split('.')[1] IP3 = BeginIP.split('.')[2] IP4 = BeginIP.split('.')[-1] EndIP_last = EndIP.split('.')[-1] for i in range(int(IP4)-1,int(EndIP_last)): ip = str(IP1+'.'+IP2+'.'+IP3+'.'+IP4) int_IP4 = int(IP4) int_IP4 += 1 IP4 = str(int_IP4) NewIP= ' '+ip+'' for line in fileinput.input('Smbtouch-1.1.1.xml',inplace=1): print line.rstrip().replace(TempIP,NewIP) TempIP = NewIP Output = os.popen(r"Smbtouch-1.1.1.exe").read() Output = Output[0:Output.find('