Autorun system for automatic tool execution on discovered services
QtRecon’s autorun system automatically launches reconnaissance tools when specific ports are discovered during scanning. This automation accelerates the enumeration phase of penetration testing.
The autorun feature executes configured programs automatically when matching ports are found on target hosts.
Enable or disable autorun globally through the application menu or configuration. You can also control whether autorun triggers on XML imports separately.
When a scan completes or XML results are imported, QtRecon checks for autorun configurations matching the discovered ports:
core/controller.py
def autorun(self, new_hosts: dict | list): """ :param new_hosts: {host_id: {'tcp': [], 'udp': []} # tcp and udp are empty if new host (or if every service must be autorun'd again """ for new_host in new_hosts: host_details = self.host_model.get_host_details(new_host) if host_details: must_autorun_everything = not (len(new_hosts[new_host]['tcp'])!=0 or len(new_hosts[new_host]['udp'])!=0) for proto in ['tcp', 'udp']: if proto not in Config.get()['autorun'].keys(): continue for port in Config.get()['autorun'][proto]: if port.upper() == 'ANY': # ... autorun logic else: for program in Config.get()['autorun'][proto][port]: self.log('AUTORUN', f"Running {Config.get()['user_binaries'][program]['name']} " f"on {proto}://{host_details['ip']}:{port}")
if 'edit_before_launch' in program.keys() and program['edit_before_launch']: reply, validated = QInputDialog.getText( self.ui, 'Edit command', f"This program is set to be reviewed before launching. " f"Here is the command that will be executed:", text=program['binary'] + ' '+' '.join(args) ) if reply and validated: program['binary'], *args = shlex.split(reply) else: return
Set edit_before_launch: true for commands that require parameter tuning or when you want to review variable substitution before execution.