@forest yeah, I figured as much. The IP address in question was in the X-Originating-IP header, which any server could have just made up along the path.
The email's (possibly spoofed) path is interesting. It originated from the DoD IP, relayed through a server from an Indonesian university, relayed through several servers from the California State University Northridge (on-prem Exchange), transferred to CSUN's Office 365 tenant, bounced around Microsoft's infrastructure, and then found its way into our tenant.
The strange thing though is that the email completely failed SPF, DKIM, and DMARC authentication (our DMARC policy says to reject), which was logged in the "Authentication-Results-Original" header. Later on, after bouncing around Microsoft's infra, MS decided that SPF, DKIM, and DMARC all passed and that it should be delivered.
Authentication-Results-Original: spf=fail (sender IP is 130.166.5.125) smtp.mailfrom=mycompanydomain.com; mycompanydomain.com; dkim=none (message not signed) header.d=none;mycompanydomain.com; dmarc=fail action=oreject header.from=mycompanydomain.com;
Authentication-Results: spf=pass (sender IP is 52.100.131.27) smtp.mailfrom=mycompanydomain.com; mycompanydomain.com; dkim=pass (signature was verified) header.d=mycsunemail.onmicrosoft.com;mycompanydomain.com; dmarc=pass action=none header.from=mycompanydomain.com;
MS is looking into it and will hopefully have an explanation on Monday. But, it get's even more interesting when I check the audit log for the target account.
For the last month, every 12 minutes and 20-40 seconds, a random IP address from around the world tries and fails to log into that account. Usually only once and then never again. Sometimes it tries twice in the same second, and then again, never uses that IP again.
It's like somebody with a large botnet has a passing interest in that account in particular. I'm not sure if the slow brute force and the spear phishing are related, but nobody else in my company received the phishing email and I've never seen any login failures following a similar pattern on any other accounts.
Manufacturing. We make high-end railing systems. I can't see why we'd be the target of anything. But the CEO, the victim of the current attacks, takes frequent trips to China to meet with our suppliers. I can see the Chinese government taking an interest in reading his emails, just to confirm he isn't up to anything they don't like. U dunno.
The thing with industrial espionage is that the businesses that seem the least interesting are actually the ones that are the most interesting. I mean something as boring as epoxy resin development is one of the top targets!
I'll try to do some more analysis this weekend. I said the brute force was happening for over a month, but that's just because I pulled a month and a half of logs and it was happening the entire time, every 12.5 minutes.
No one in particular without knowing more about the attacker. I mean France is a huge part of industrial espionage, just like China.
It could also be Russia (though I think they care more about semi research than railing systems, but who knows). Or even the USA. Unless this attack matches a pattern from a particular adversary, it's too early to say who it was.
I'm curious if any of the attacking IPs have an open port used for remote access which could provide some insights. I'll scan one in the Russian Federation, since they won't care about a little port scan.
Well, at the moment I'm talking about the IPs which are attempting to log into the account directly, not the ones involved in the phishing attack. I have no reason to believe the university servers are spoofed, since that all makes sense. They left some relays open, probably.
As for the IPs trying to log in, 5.202.46.77 is in Iran, so I doubt he'll care if I port scan him. I'll do it from AWS just to keep Comcast happy with me :P
Unfortunately no. I suspect my anti-virus ate it. I use Bitdefender, which has "advanced threat protection", meaning it looks for suspicious activity like scripts. So from time to time, it will kill my Powershell sessions and eat everythig it was touching.
That's one reason I prefer Linux. My system doesn't betray me randomly.
Although twice the vDSO did seem to vanish after a long-ish period of uptime (only noticed it when seccomp filters that did not whitelist calls normally made via vDSO started failing)... That was kind of unexpected. And scary.
I've always preferred Linux too. I grew up using that stuff. Starting with Ubuntu 9.04. These days though I have to write a lot of code for SharePoint and Excel Macros, so I have to stick with Windows. Plus having PowerShell is really convenient for MS environments.
Screw it, I'll just scan it from home and tell Comcast to suck it.
When I need Windows things (and Wine doesn't work), I run it in a VM and forward the relevant window to my X11 environment. Lets it integrated seamlessly with X11 applications, with just a little extra delay during VM initialization.
Not a bad idea. I do the opposite, I run Windows 10 and then spin up a local or remove Linux VM when I need to do Linux things. Plus I use Scoop in PowerShell, which is a better implementation of cygwin-like tools.
*remote Linux VM
The problem with picking an IP on the other side of the world is waiting for nmap to scan all 65535 ports on the other side of the world
Well if I was trying to hide a service on a device I'd pick a port that nobody would bother scanning, so the only way to be sure is to scan them all :P
For someone abusing a bunch of insecure routers, it's unlikely that they've put much effort into securing the systems. Hell, most botnets built from vulnerabilities leave the vulnerabilities unpatched!
What kind of device is it? Assuming you did OS fingerprinting, of course.
You can often narrow down the services. For a router in a DC, you might want to check for IPMI or telnet. For a SOHO router, you might want to check for SOAP or SSH.
@ scripts > nmap 45.70.204.254 Starting Nmap 7.70 ( https://nmap.org ) at 2018-10-19 22:48 Pacific Daylight Time Nmap scan report for 45.70.204.254 Host is up (0.18s latency). Not shown: 993 closed ports PORT STATE SERVICE 25/tcp filtered smtp 135/tcp filtered msrpc 139/tcp filtered netbios-ssn 445/tcp filtered microsoft-ds 1723/tcp open pptp 2000/tcp open cisco-sccp 8291/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 11.94 seconds
@ scripts > nmap --version-all -O 45.70.204.254 Starting Nmap 7.70 ( https://nmap.org ) at 2018-10-19 22:51 Pacific Daylight Time Nmap scan report for 45.70.204.254 Host is up (0.18s latency). Not shown: 993 closed ports PORT STATE SERVICE 25/tcp filtered smtp 135/tcp filtered msrpc 139/tcp filtered netbios-ssn 445/tcp filtered microsoft-ds 1723/tcp open pptp 2000/tcp open cisco-sccp 8291/tcp open unknown Device type: general purpose Running: Linux 2.6.X|3.X OS CPE: cpe:/o:linux:linux_kernel:2.6 cpe:/o:linux:linux_kernel:3
Netcat also works, though it might not be able to detect the service if it doesn't respond immediately (like OpenSSH does) and simply waits with an open connection for the client to send something relevant.
PORT STATE SERVICE VERSION 25/tcp filtered smtp 135/tcp filtered msrpc 139/tcp filtered netbios-ssn 445/tcp filtered microsoft-ds 1723/tcp open pptp MikroTik (Firmware: 1) 2000/tcp open bandwidth-test MikroTik bandwidth-test server 8291/tcp open unknown Service Info: Host: CORE TUNINS
Looks like you got your answer. So that shows that port 2000 was not necessarily "cisco-sccp", but some sort of bandwidth test thing.
So that system is a MikroTik router. Either it is the device that was exploited, or the exploited device lives behind it with NAT. Did you manage to capture the TCP fingerprint of the attacker, to see if it matches that of the router?
Because it could just as likely be that the victim system is a Windows machine behind that router as it is that the router itself is the culprit.
Nice. I should do something like that eventually just so I have some control. I currently just have my ISP's router set up, and the a bunch of firewalls on my endpoints. Honestly I don't want ANY ports open to the internet, but ISPs don't seem to see the issue.
I may set that up some day. Though I'd have to send the ISPs router back one way or the other. It's a router-modem combo, so I can't insert a custom device after the modem.
Actually it may. That would make things a bit easier.
I can't wait until Tesla gets some affordable satellite internet up and running. Not free, but still cooler than coax.
That all-port scan finally finished.
Nmap scan report for 45.70.204.254 Host is up (0.29s latency). Not shown: 65405 closed ports, 126 filtered ports PORT STATE SERVICE 1723/tcp open pptp 2000/tcp open cisco-sccp 4145/tcp open vvr-control 8291/tcp open unknown
It's also possible that this isn't a botnet owned by the attacker, merely a proxy list the attacker got (which would contain botnets, free proxy servers, misconfigured proxy servers, etc). E.g. you can get proxies like that from Vip72.
I just read a news story that says Windows 10 will soon use Google's retpoline for Spectre defense, giving users back virtually all of their processor's power.
I was dealing with a legacy desktop we have set up at work for a special purpose and wondering why is it so slow. It has a 10 year old Xeon, but it still shouldn't be dragging its feet that much. And then I remembered that it's patched against Spectre and it all makes sense. But it's running Windows 7, so it's doomed forever.
It's a compiler plugin, which usually means kernel, but I'm sure it could be modified easily to support userland code (like RAP and, if you had the "secret sauce" static analysis plugin, the integer overflow protection plugin too).
Nope, it's only available to grsecurity customers.
And Brad Spengler has such a... abrasive personality that it's unlikely that he'll ever release it back to the public (technically you can make GPLed code customer-only).
There's a reason I'm so pessimistic about Linux security now that grsec is non-public.
It used to be public. Grsecurity and PaX basically invented a large subset of the security techniques we use today (NX and ASLR, SMEP and SMAP, etc. are all based on their designs). They also created the first fully-functional forward and backwards CFI for the Linux kernel called RAP, as well as complete refcount overflow mitigations and complete integer overflow protection.
They went closed because of drama between the founders and the Linux Foundation, Intel (specifically its subsidiary Wind River Systems), and Google.
KSPP is not a competitor. It is a project to get improved security features into the Linux kernel, funded by the Core Infrastructure Initiative. Grsecurity, on the other hand, is a security patch for Linux produced by Open Source Security, Inc. Grsecurity is implemented as a series of modificatio...
The sad thing is that, right now, the default configuration for Linux (either from kernel.org or from most distro-specific kernel configs) is a good bit less secure than the Windows kernel, even though Windows is closed source. Linux has better potential when configured properly, but by default, it kinda sucks. Grsecurity reverses that, making even the default Linux kernel the most secure large monolithic kernel available.
That's rather unfortunate. I'm surprised I've never heard of them. Though I'm only recently getting into security. What kind of entities are able to be subscribers of them? I'd imagine their mitigation would be included in Redhat's distributions if you have a subscription with them.
That is kind of pricey, but not nearly as pricey as being hacked. Some friends and I are thinking of starting an LLC, mostly just as a holding company for us to explore our ideas. Though something like that wouldn't be on our roadmap for many years.
That's their "budget" price which allows up to 10 installations.
Of course, there is nothing forcing you to install on 10 systems or less. They just ask you before you buy how many systems you plan to run on it, and adjust the price based on your answer.
Well if you ever want to purchase grsecurity, get in contact with me via email (it's on my profile). I have plenty of bitcoins and can pay for it in full. :)
Ah, that's not bad. If you're willing to put down that kind of capital why not just start your own LLC? :P Well I suppose you'd have the endless tax headache.
Same reason I can't just pay them via bank transfer (since I only have bitcoins at my disposal). I make money but do not like to disclose to anyone who I am.
They don't like selling to "individuals" because they're afraid their open source code will be "leaked", which would let Google and Intel read them, which grsec does not want.
My guess is that it's used by a lot of people, not just one guy. Most likely not even developed by the guy who attacked the routers. He's likely just using the socks proxies that were put on the routers to attack you (among others).
I'm sure they will. And if they all get patched, just scan the internet for more addresses with port 4145 open. I'll create a paste of this, one second.
Everyone does it. On IRC, I used to have a ping command as my QUIT message. Anyone who put it in would suddenly flood a DoD server with ICMP messages containing a payload that, in ASCII, was something like "I will kill Obama".
I guess they just don't monitor that stuff. And I can't really blame them, I don't want my tax dollars going to pay some fool to examine port scans and ICMP payloads all day, every day.
Port scans happen all the time. It wouldn't trigger anything more than an alert that may block those addresses. And it's not like those servers have anything really sensitive on them anyway.
Yeah, they wouldn't exactly tall IANA to apply a label like that to something important. If only it said "NSA Tailored Access Operations", that would be the fun stuff.
The Vault7 leaks and such contain some interesting info on that.
On how to recognize some specific CIA hosts (which are, obviously, not linked at all with the CIA. Actually they're infected foreign mail servers and such).
I disregard some laws. Like the speed limit. The law doesn't follow that law either.
So do these socks proxies provide any extra features, like access to the router's firmware, or the network behind the firewall? I might have to re-exploit to get that deep.
Well you can but it's better to use torsocks and just set Linux to block non-Tor connections, since transparent proxying ("system-wide Tor") has some ugly leaks.
Looks like it runs as debian-tor by default, and then I ran this to block all others:
iptables -F OUTPUT iptables -A OUTPUT -j ACCEPT -m owner --uid-owner debian-tor iptables -A OUTPUT -j ACCEPT -o lo #used to allow traffic over the loopback device and is completely safe. iptables -A OUTPUT -j ACCEPT -p udp --dport 123 #allow outbound NTP connections that are not routed over tor iptables -P OUTPUT DROP iptables -L -v
Ugh, this is too much work for tonight. This exploit seems promising: exploit-db.com/exploits/45170, but for whatever reason, 'metasploit' isn't a python module on my Kali VM.
So after all this digging, some things are clear:
1) somebody who acquired a list of open Socks proxies has an interest in my CEOs email account
You know what I hate more than anything else? Websites that use custom mouse cursor icons. I found a blog talking about the Homolka and Bernardo murders with a retarded machine gun as the cursor: krispykreeps.tumblr.com