Expect script that simulates a SSH brute force attack
I want to test the effectiveness of sshguard on some of my systems so I'm trying to write a script that simulates a brute force attack by sending a bunch of different username and password combinations to the servers being tested. So far I have this:
This works fine but I would like for the script to read usernames from a file one at a time and connect as each of the users. I've seen some examples of expect loops and tried them but they all seem to read the whole file as a string instead of executing the SSH command for each line in the file. How can I make this work?
Thanks!
J.
Last edited by Corona688; 08-14-2014 at 01:03 PM..
Hi,
I'm trying find out if there is a way to stop a brute force attack on a Webmail site. I'm trying to setup a webmail access, but I would like to prevent too many invalid logins from the same IP.
I've looked into Snort, but I was wondering if there was an application level firewall that can... (1 Reply)
Im currently experiancing a brute force attack on my server
Nov 26 15:27:04 ws096 saslauthd: do_auth : auth failure:
Nov 26 15:27:13 ws096 saslauthd: do_auth : auth failure:
Nov 26 15:27:22 ws096 saslauthd: do_auth : auth failure:
Nov 26 15:27:29 ws096... (4 Replies)
Guys,
I know this is tricky.. I'm trying to write a script to pull info from a MMI device.
Following script logins into the server and then changes to super user. Opens MMI session and then exits out. I need to run the command under the MMI session "dsp_alarm_span all" Is there any other way to... (2 Replies)
Ok, i don't know if anyone else here have had to deal with something like this before, but here's my situation.
I have about 1000+ servers I need to log into to do something.
What i need to do is to log into each server, go to a certain directory on each of the servers, copy the files that... (3 Replies)
Hi all,
I want to connect to some host with "ssh". I have googled and got some commands of "expect" and "spawn". I was not aware of these commands and tried below script.
$ cat auto.sh
set host xx.xx.xx.xx
set password abcd@1234
set user root
spawn ssh $user@$host
expect "*?assword:*"... (4 Replies)
How can I pass password in SSH command without using expect in a shell program.
I don't have expect installed on my Solaris server.
#!/bin/bash
ssh user@hotname (how to supply pass in script?:wall:)
Experts please help its very urgent.
Shrawan Kumar Sahu (4 Replies)
Dear All,
I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Discussion started by: ss112233
5 Replies
LEARN ABOUT MOJAVE
csgather
csgather(1) BSD General Commands Manual csgather(1)NAME
csgather -- Gather CoreStorage metadata for diagnosis
SYNOPSIS
csgather -G dir device ...
csgather -r mountPoint [-o filename]
DESCRIPTION
csgather gathers CoreStorage metadata for diagnosis. It works in two modes.
In the first mode where -G and a list of devices are provided, CoreStorage metadata on these list of devices will be collected. The col-
lected information includes the size and UUID of the CoreStorage logical and physical volumes, the name of the logical volumes, the wrapped
(encrypted) volume key (which can only be decrypted by a brute-force attack), user name and user login image file. No other user information
(such as directory structure, file names, file content, etc) is collected.
In the second mode where -r is provided, the encryption context which includes the wrapped volume key (which can only be decrypted by a
brute-force attack), user name and user login image file will be collected.
If the wrapped volume key is decrypted by a brute-force attack, the volume key used to encrypt data on CoreStorage Logical Volumes is in the
clear. It is not mathematically possible to derive the user's passphrase from the volume key. The volume key is only useful when the
attacker has access to the encrypted data in the CoreStorage Logical Volume, which are not collected by csgather.
The following options are available:
-G dir Gather all CoreStorage metadata and write into the specified directory. The given directory must not already exist.
-o filename Specify the output file generated by the -r option. If not given, use standard output.
-r mountPoint Find out the CoreStorage logical volume identified by the given mount point, and print its encryption context to the file
given in the -o option.
SEE ALSO csdiagnose(1)HISTORY
The csgather utility first appeared along with CoreStorage in OS X 10.10.0.
OS X May 31, 2019 OS X