A blog about my rantings, including Games, Game Development, Gaming, Consoles, PC Gaming, Role Playing Games, People, Gaming tips & cheats, Game Programming and a plethora of other stuff.
Showing posts with label hackers. Show all posts
Showing posts with label hackers. Show all posts
Tuesday, 6 November 2018
Wednesday, 25 January 2017
Administrator : Friend Still in Failure
Can you hear a banging noise?... No... Are you sure?... I can.. Oh no wait, that's my head slamming into the desk.
A few weeks ago I posted about a friend for whom I uncovered a security loop hole for, the python script being run as root...
Well, it seems the same person, on their main "enterprise windows server" has been similarly hacked by the same chap, but the trick was this one.... http://megalomaniacbore.blogspot.co.uk/2016/04/windoze-security-loop-hole.html
Yes, a loophole I had mentioned and blogged about.
The loophole was exposed by a C# program the chap had written for them, I'm not sure what it did, but it was run as a service, and could spawn other programs under the same user, he'd written it so that it ran any program in a sub-folder then before he'd left he made it run a VLC remote desktop and another small program which opened a "Save As" dialog.
It opened this way way off screen, at something like location 20000 x 4500. So the only indication it was there was a small twitch to the task bar, but he used the mouse to the browse the dialogue to the command executable and opened himself a prompt as the administrator user.
I didn't spot this, I didn't even look at this machine for my mate, instead over the weekend I had a machine at home I was using as a network routing test, and I asked for some space on a remote server with a fat pipe to do a slow-loris type attack on my software.
I set up my end and set up their end, expecting to get something like 200mb/sec attacking me and swamping my little 64K buffer (I could then scale and tune my software to defeat this kind of attack, was the plan).
What I noticed was that I only got around 8mb/sec coming to me, so with my remote session I did a little digging and saw the disk activity was around 34%, with no-one in the office?!??!
The developer they'd let go was running a torrent service from the machine! He was downloading and seeding several video streams of dubious merit and origin.
I didn't change anything, I just called my friend and explained... And I left it there, I'm yet to hear what was going on.
However, I think my friend will be having a word with the IT Admin he's had in place for nearing a month for not spotting that out of hours and weekends this persistent idiot is still infiltrating and using their systems as his own repository.
I've told them three times now to unplug everything and to put a secure router between their switch and the outside world, something brand new and only set up by them, pfSense perhaps, but they've not listened.
A few weeks ago I posted about a friend for whom I uncovered a security loop hole for, the python script being run as root...
Well, it seems the same person, on their main "enterprise windows server" has been similarly hacked by the same chap, but the trick was this one.... http://megalomaniacbore.blogspot.co.uk/2016/04/windoze-security-loop-hole.html
Yes, a loophole I had mentioned and blogged about.
The loophole was exposed by a C# program the chap had written for them, I'm not sure what it did, but it was run as a service, and could spawn other programs under the same user, he'd written it so that it ran any program in a sub-folder then before he'd left he made it run a VLC remote desktop and another small program which opened a "Save As" dialog.
It opened this way way off screen, at something like location 20000 x 4500. So the only indication it was there was a small twitch to the task bar, but he used the mouse to the browse the dialogue to the command executable and opened himself a prompt as the administrator user.
I didn't spot this, I didn't even look at this machine for my mate, instead over the weekend I had a machine at home I was using as a network routing test, and I asked for some space on a remote server with a fat pipe to do a slow-loris type attack on my software.
I set up my end and set up their end, expecting to get something like 200mb/sec attacking me and swamping my little 64K buffer (I could then scale and tune my software to defeat this kind of attack, was the plan).
What I noticed was that I only got around 8mb/sec coming to me, so with my remote session I did a little digging and saw the disk activity was around 34%, with no-one in the office?!??!
The developer they'd let go was running a torrent service from the machine! He was downloading and seeding several video streams of dubious merit and origin.
I didn't change anything, I just called my friend and explained... And I left it there, I'm yet to hear what was going on.
However, I think my friend will be having a word with the IT Admin he's had in place for nearing a month for not spotting that out of hours and weekends this persistent idiot is still infiltrating and using their systems as his own repository.
I've told them three times now to unplug everything and to put a secure router between their switch and the outside world, something brand new and only set up by them, pfSense perhaps, but they've not listened.
Saturday, 24 December 2016
Administrator : Blocking Spammers & Hackers (Basics)
To see whom has been trying to connect to your Debian (or Ubuntu) server, use:
cat /var/log/auth.log | grep "Failed"
This will list out the failed attempts, then add the successful with:
cat /var/log/auth.log | grep "session opened" | grep "LOGIN"
You can note the IP addresses for the unwanted attempts and block them with iptables, like this:
sudo iptables -I INPUT -s AAA.BBB.CCC.DDD -p tcp --dport ZZZ -j REJECT
Where the IP to block is "AAA.BBB.CCC.DDD" and the port is "ZZZ" as a number, so to block 192.168.0.1 on port 7000 you would do:
sudo iptables -I INPUT -s 192.168.0.1 -p tcp --dport 7000 -j REJECT
Instead of REJECT you can use DROP, and in place of tcp you can use udp and icmp protocols.
To block a whole subnet range I just do this:
sudo iptables -A INPUT -s AAA.BBB.CCC.000/AAA.BBB.CCC.255 -p tcp --dport ZZZ -j DROP
This makes all addresses in the range not respond, the range could have been 192.168.0.0/192.168.0.255, or you could block higher up the range like this 192.168.0.0/192.160.255.255, the first address range blocks just the last section subnet mask, the second blocks the last two sections of the subnet mask!
You can view the iptables in use with:
sudo iptables -L
Why Does This Exist?
Its not often I have to actually turn a server towards the outside world, my personal servers usually sit on my LAN and never route to the internet, like-wise the items I provision in the office are for internal use...
Yesterday however, I had the pleasure of being told to make a service available to the outside world...
No big deal, it's Apache2 on a Ubuntu host, set up done... And I only opened port 80 then left it... All was fine...
It has run for six hours... six... On a brand new acquired IP address, no-one but the recipient at the far end knows about the server being there, it has no DNS entry, it has no other services, just port 80 and ssh open...
Yes, I have had hacker, poking, security breach attempts from China, Vietnam, the British Virgin Islands, Canada, the Netherlands and Russia...
The mind boggles at quite how much hacking and infiltration is going on out there...
I've been checking the mainly ssh breach attempts with the command:
cat /var/log/auth.log | grep "Failed"
I run this to a file and then have a python script to log the IP addresses into a table for me, and I can then just block them individually or as a subnet range, though iptables.
I also check for successful logins just in case with:
cat /var/log/auth.log | grep "session opened" | grep "LOGIN"
I wonder however whether a python script to manage all this for me might be in order... Hmmm, project time!
Subscribe to:
Posts (Atom)