Warning I deny any responsibility for using this article to launch an assault on a website that you don’t own.
TL;DR
In this article, you will find a procedure to launch a distributed load test of ApacheBench (AB) on your website. I will use: BeesWithMachineGuns
Requirements
- Boto / awscli
- Python 2.6 - 3.6
- paramiko
Installation
aws configure
with your credentialssudo pip install https://github.com/newsapps/beeswithmachineguns/archive/master.zip
Launch ssh-agent, add your key:
Copy your EC2 ssh-key pair to your instance, in /home/ec2-user/.ssh/
. This key will be used to launch bees.
The name of the key must be the same name as it shows in the EC2 console.
Run
eval $(ssh-agent -s)
ssh-add your_key.pem
Bees Usage
Let’s launch a bees attack!
Please use a specific security group and subnet.
|
|
Then shut down your bees army: bees down
Double-check if there is no more EC2 instance running in EC2 console.
Tips
- Check the AMI you are using, validate that AB is properly installed.
- Use the following option to tag your instances:
-x "{'Project':'Bees'}"
- Prefer
t2.micro
instance type cheaper thant1.micro
and more robust for a large attack. - You should try
-b 0.0040
switch (for example) to launch bees army on spot market. - You can also try
hurl attack
I recommend you to make your own ami image. I’ve used the official one, but surprisingly, there is no ApacheBench installed.
Official ami : ami-8b8f59f2
(eu-west-1) - Link
Please don’t hesitate to ping me with any questions, on Twitter or in the comments below.
That’s all folks!
zoph.