-
Notifications
You must be signed in to change notification settings - Fork 0
/
Instructions
137 lines (90 loc) · 3.98 KB
/
Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
gcloud config list
gcloud compute regions list
gcloud compute firewall-rules list
gcloud compute firewall-rules create http \
--allow tcp:80 \
--description="Allow HTTP from Anywhere" \
--direction ingress \
--target-tags="mhn-admin"
gcloud compute firewall-rules create honeymap \
--allow tcp:3000 \
--description="Allow HoneyMap Feature from Anywhere" \
--direction ingress \
--target-tags="mhn-admin"
gcloud compute firewall-rules create hpfeeds \
--allow tcp:10000 \
--description="Allow HPFeeds from Anywhere" \
--direction ingress \
--target-tags="mhn-admin"
# Create a VM for mhn-admin, instance type- n1-standard-1
# and bind to previously defined fire-wall rules matching mhn-admin
# tag
gcloud compute instances create "mhn-admin" \
--machine-type "n1-standard-1" \
--subnet "default" \
--maintenance-policy "MIGRATE" \
--tags "mhn-admin" \
--image-family "ubuntu-minimal-1804-lts" \
--image-project "ubuntu-os-cloud" \
--boot-disk-size "10" \
--boot-disk-type "pd-standard" \
--boot-disk-device-name "mhn-admin"
Output:
WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#performance.
Created [https://www.googleapis.com/compute/v1/projects/blissful-canyon-332005/zones/us-east1-b/instances/mhn-admin].
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
mhn-admin us-east1-b n1-standard-1 10.142.0.3 34.138.77.219 RUNNING
# Connect to mhn-admin instance using gcloud ssh
gcloud compute ssh mhn-admin
cd /opt/
sudo git clone https://github.com/pwnlandia/mhn.git
cd mhn/
sudo sed -i 's/Flask-SQLAlchemy==2.3.2/Flask-SQLAlchemy==2.5.1/g' server/requirements.txt
sudo ./install.sh
****Welcome*****
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.11.0-1021-gcp x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command.
0 updates can be applied immediately.
The list of available updates is more than a week old.
To check for new updates run: sudo apt update
***update repos***
sudo apt update
*** git and python-magic
sudo apt install git python-magic -y
***Download MHN w/ python requirements
cd /opt/
sudo git clone https://github.com/pwnlandia/mhn.git
cd mhn/
sudo sed -i 's/Flask-SQLAlchemy==2.3.2/Flask-SQLAlchemy==2.5.1/g' server/requirements.txt
sudo ./install.sh
# create firewall rule allowing all incoming tcp/udp traffic
gcloud compute firewall-rules create wideopen \
--description="Allow TCP and UDP from Anywhere" \
--direction ingress \
--action=allow \
--priority=1000 \
--rules=tcp,udp \
--source-ranges=0.0.0.0/0 \
--target-tags="honeypot"
#Create VM
gcloud compute instances create "honeypot-1" \
--machine-type "n1-standard-1" \
--subnet "default" \
--maintenance-policy "MIGRATE" \
--tags "honeypot" \
--image-family "ubuntu-minimal-1804-lts" \
--image-project "ubuntu-os-cloud" \
--boot-disk-size "10" \
--boot-disk-type "pd-standard" \
--boot-disk-device-name "honeypot-1"
WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#performance.
Created [https://www.googleapis.com/compute/v1/projects/blissful-canyon-332005/zones/us-east1-b/instances/honeypot-1].
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
honeypot-1 us-east1-b n1-standard-1 10.142.0.4 34.73.181.208 RUNNING
#Deployment Command
wget "http://34.138.77.219/api/script/?text=true&script_id=2" -O deploy.sh && sudo bash deploy.sh http://34.138.77.219 FkO6KMHd