Silicon Shecky

Infosec Practitioner

  • About
  • Categories
    • General
    • Computers
    • Software
    • Rants
    • Security
    • Internet/Music
    • Reviews
    • Microsoft
    • Hardware
    • Mobile Computing
  • Links
    • Infosec
      • Burbsec
      • Infosec Exchange Mastodon
      • Hacks4Pancakes Blog
      • Krebs On Security
      • Bleeping Computer
  • Archives

Connect

  • Bluesky
  • LinkedIn
  • Mastodon
  • RSS
  • Twitter

[footer_backtotop]

Copyright © 2025 ·Sixteen Nine Pro Theme · Genesis Framework by StudioPress · WordPress

Incident or Typo?

March 22, 2018 By Michael Kavka Leave a Comment

I will take, “Incidental Panics” for $1000 Alex.

There is something to be said to using the KISS (Keep It Simple Stupid) method in just about everything. We all tend to forget the simple things. Then the universe decided to show us again. I recently ran into a situation where I was asked to look at a machine that was constantly trying to connect to an IP address in China. The premise was, why is it doing this and more importantly why is nothing detecting something wrong? It was a spot check of firewall logs while trying to fix something with the log system that revealed this issue. Needless to say there was a mini-panic induced and it filtered to me. Here is what I did.

First off, I looked into Splunk for not only the Chinese IP I was given, but also the computer’s IP address. This allowed me to see that it was trying to connect to port 9100. I should have been quick from here because 9100 is a known port used for printing. Yeah, I forgot my own words of Keep It Simple Stupid and to quote Doctor Who, “Took the long way around,” to get to the final result. the long way was like this:

I did a netstat -a to see what connections were occurring.

I downloaded the Sysinternals suite and used TCPView to see what process was attempting the connection. This revealed it was the print spooler service. Again I should have been able to finish things up right here, but continued on the long path.

I then Used Process Monitor and Process Explorer to look into the spooler service to see if it had been compromised, which it had not.

Finally, I looked in the spooler directory and saw a job sitting there. This gave me the idea of actually looking at printers and devices, finding the printer that had a job pending, looking at the properties of that printer and seeing its IP was set as the offending Chinese IP.

I did this remotely while one of our on site technicians was in front of the machine, watching what I was doing. He sees the IP and messages me that if the first octet was 11 instead of 1, it was the right IP for a printer at that location. Problem solved. The whole thing was a typo. The continuous connection attempts were the print queue trying to print out an e-mail, and constantly retrying, to an IP that was wrong. This also explained why our tools did not see this as a threat.

I stated at different points I could have finished the investigation earlier. When I saw it was the spooler service, I should have checked printers and the queue for something pending. After that I could have checked for compromise in the spooler service. I didn’t because I did not think of that due to assuming it was a compromised system bases on the information I was initially given. Also, from a forensic standpoint, I had a chance to catch it doing instead of having to recreate the situation. The same is true when I saw what port it was using. It is possible that had I gone straight to the end I could have been wrong, and we could have gone back to square one. As it turns out, I spend 45 minutes instead of 10 on this whole situation. I also got to stretch my investigative muscles and use tools in a way I don’t always get to, allowing me to refresh skills that are not always used. Sometimes there is something to not using the KISS method, as long as taking the long way does not have a negative effect.

Now you decide, is this typo an incident? I say not.

Filed Under: Security Tagged With: Forensic Investigation, spoolsv.exe, Sysinternals

We’ve been Hacked! A Client’s issue

January 25, 2014 By Michael Kavka Leave a Comment

I deal with a lot of small businesses and getting them to understand security risks of old software and why hackers would want to hack them is difficult at best. Recently one client of mine learned the hard way.

Money they say is the root of all evil, and for SMBs a root of security problems. They do not want to spend money to upgrade PCs and servers until the last possible minute before they crash out. You tell them that they are insecure because of the old systems, and they come back with, “We are small and have nothing that a hacker would want.” This is due to the way hacks are presented in the media. All you hear about are the hacks of government systems, or large companies that have credit card data. SMBs don’t have huge secrets (most of the time), and just don’t get it.

This attitude recently bit one of my clients in the rear big time. They noticed that things were running slow on their SBS2003 server. they also noticed a bunch of new user accounts set up on the server. We would delete the accounts and they would say, ok, we will watch for this to happen again. I ran malware detection programs such as Malwarebytes on their machines and server to find nothing more than a couple of tracking cookies and a few common adware toolbars. I’d remove these and we would then wait. The waiting is the hardest part. Finally it became so annoying they asked what we could really do, as they were not spending money on a new system. So, at their behest, I went on site where I could focus on the task at hand without being disturbed by other clients, and watch the system from the console. That is where the fun really began.

I started off using process explorer to just take a general look at the system health. I noticed the CPU was being heavily used, but I have seen that on SBS servers before, usually because of e-mail coming in and being scanned, or SQL databases being used. Still,. I kept Process explorer open and opened the Terminal Server manager, where I noticed a clue to what was happening.

In the matter of minutes I watched a listener connect and disconnect, an obvious brute force attack on remote access for the server. this prompted me to open up Wireshark and take a look at incoming connections. This is what I saw:

primecoin wireshark

A quick check online of this IP Address showed it to be in Germany. Now why would someone from Germany try to brute force this small company? Well the next clue was hiding in plain site.

The problem with working in the IT field is overconfidence. It is what makes us overlook the obvious. In this case I was not noticing something in Process Explorer.

Process Explorer hack primecoin

Yes the suspended processes in the screen shot were the culprits. Don’t they look like normal Windows Processes though? They key was their actual path. Svchost.exe normall resides in C:\Windows\System32, but in the case of the processes I suspended they were located in c:\Windows\System. Odd I thought so I went to the C:\Windows\System directory and noticed a bunch of files I had not seen before, including a subdirectory. I double checked on a different client’s SBS2003 server (Yes I have a few that still run it), and sure enough, the subdirectories and extra files I had found were not supposed to be there. The System directory is not supposed to have any subdirectories at all. Add on that one of the directories was called Primecoin. Well a quick Google search revealed that Primecoin is a Bitcoin competitor, and obviously that the mining of Primecoins was the reason people were interested in this server.

The WMIAPSRV.exe seen above actually had the handles below:

Type    Name
Desktop    \Default
Directory    \BaseNamedObjects
Directory    \KnownDlls
Event    \BaseNamedObjects\crypt32LogoffEvent
File    \Device\WMIDataDevice
File    \Device\Tcp
File    C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca
File    \Device\Tcp
File    \Device\Afd
File    \Device\Afd
File    \Device\Afd
File    \Device\Tcp
File    \Device\Afd
File    C:\WINDOWS\system\Primecoin\chainstate\015178.sst
File    \Device\NamedPipe\uRGbKdRczuUDzDTuzx7VIdviMwLONGGIPD6f3it5Br5zV6wrIiu37N5igtR6IoSJe62SrbPkkc3byxULtHhVzwGwlQ1jmxJLyTpomhoKfpPkJ4yyIArQA4
File    \Device\NamedPipe\AwB7B3gyoJxp8Jk4WcCDjrJzOto8OOwUfuQr9g7csXW2ql7KI6Pbd26p9VHiIEJPO1PVE4nABknBmzUIQ8dlkWwaKO6fU4LJXp5CprT4CxPbJFToZaCb6e
File    C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca
File    \Device\WMIDataDevice
File    \Device\WMIDataDevice
File    C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_5.82.3790.5190_x-ww_D21E1F39
File    C:\WINDOWS\system\Primecoin\chainstate\015181.sst
File    C:\WINDOWS\system\Primecoin\chainstate\015183.sst
File    \Device\Tcp
File    \Device\Afd
File    \Device\Afd
File    \Device\Tcp6
File    \Device\Afd
File    \Device\Afd
File    \Device\Tcp
File    \Device\Tcp
File    \Device\Afd
File    \Device\Afd
File    \Device\Tcp
File    \Device\Afd
File    \Device\Tcp
File    \Device\Afd
File    \Device\Afd
File    \Device\Tcp
File    C:\WINDOWS\system\Primecoin\chainstate\015179.sst
File    C:\WINDOWS\system\Primecoin\chainstate\015180.sst
File    \Device\Tcp
File    C:\WINDOWS\system\Primecoin\chainstate\015182.sst
File    C:\WINDOWS\system\Primecoin\chainstate\015177.sst
File    C:\WINDOWS\system\Primecoin\database\log.0000000004
File    C:\WINDOWS\system\Primecoin\database\log.0000000004
File    C:\WINDOWS\system\Primecoin\chainstate\015176.sst
File    C:\WINDOWS\system\Primecoin\wallet.dat
File    C:\WINDOWS\system\Primecoin\wallet.dat
File    C:\WINDOWS\system\Primecoin\chainstate\015175.sst
File    \Device\Tcp
File    \Device\Tcp
File    C:\WINDOWS\system\Primecoin\blocks\index\003151.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\003150.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007322.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007321.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007320.sst
File    \Device\Tcp
File    C:\WINDOWS\system\Primecoin\blocks\index\007317.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007374.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\006726.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\004791.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\006724.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\006723.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\006722.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007323.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\006720.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\006719.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\006718.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\006717.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007373.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\004800.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\004799.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007372.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\004798.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\004797.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\004796.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\004795.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007371.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\004794.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\004793.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\004792.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007319.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007370.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007376.sst
File    C:\WINDOWS\system\Primecoin\chainstate\MANIFEST-015172
File    C:\WINDOWS\system\Primecoin\chainstate\015174.log
File    C:\WINDOWS\system\Primecoin\chainstate\LOCK
File    C:\WINDOWS\system\Primecoin\chainstate\LOG
File    C:\WINDOWS\system\Primecoin\blocks\index\MANIFEST-007378
File    C:\WINDOWS\system\Primecoin\blocks\index\007379.sst
File    C:\WINDOWS\system\Primecoin\blocks\index\007380.log
File    C:\WINDOWS\system\Primecoin\blocks\index\LOCK
File    C:\WINDOWS\system\Primecoin\blocks\index\LOG
File    \Device\Afd
File    \Device\Tcp
File    \Device\Afd
File    \Device\Tcp6
File    C:\WINDOWS\system\Primecoin\db.log
File    \Device\Tcp
File    C:\WINDOWS\system\Primecoin\debug.log
File    C:\WINDOWS\system\Primecoin\.lock
File    \Device\Tcp
File    \Device\Tcp
File    \Device\Tcp
File    \Device\KsecDD
File    C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.5190_x-ww_319264BE
File    \Device\Ip
File    \Device\Ip
File    \Device\Ip
File    \Device\Tcp
File    \Device\Tcp
File    \Device\Tcp
File    C:\WINDOWS\system
Key    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\DllNXOptions
Key    HKLM\SYSTEM\ControlSet001\Services\MSExchangeAL\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\PerfOS\Performance
Key    HKLM\SYSTEM\ControlSet001\Control\Nls\Language Groups
Key    HKLM\SYSTEM\ControlSet001\Control\Nls\Locale
Key    HKLM\SYSTEM\ControlSet001\Control\Nls\Locale\Alternate Sorts
Key    HKLM\SYSTEM\ControlSet001\Services\MSExchangeAL\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\MSExchangeAL\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\ASP.NET_2.0.50727\Names
Key    HKLM\SYSTEM\ControlSet001\Services\MSExchangeAL\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\MSExchangeAL\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\MSExchangeAL\Performance
Key    HKU\.DEFAULT
Key    HKLM\SYSTEM\ControlSet001\Services\WinSock2\Parameters\NameSpace_Catalog5
Key    HKLM\SYSTEM\ControlSet001\Services\WinSock2\Parameters\Protocol_Catalog9
Key    HKLM\SYSTEM\ControlSet001\Services\NetBT\Parameters
Key    HKLM\SYSTEM\ControlSet001\Services\NetBT\Parameters\Interfaces
Key    HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters
Key    HKLM\SYSTEM\ControlSet001\Services\Tcpip\Linkage
Key    HKLM
Key    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
Key    HKLM\SYSTEM\ControlSet001\Services\PerfOS\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\MSExchangeAL\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\PerfOS\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\PerfOS\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\PerfOS\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\PerfOS\Performance
Key    HKLM\SYSTEM\ControlSet001\Services\PerfOS\Performance
KeyedEvent    \KernelObjects\CritSecOutOfMemoryEvent
Mutant    \BaseNamedObjects\__PDH_PLA_INSTALL_MUTEX__
Mutant    \BaseNamedObjects\__PDH_PLA_MUTEX__
Process    wmiapsrv.exe(7476)
Semaphore    \BaseNamedObjects\shell.{210A4BA0-3AEA-1069-A2D9-08002B30309D}
Semaphore    \BaseNamedObjects\shell.{A48F1A32-A340-11D1-BC6B-00A0C90312E1}
Thread    wmiapsrv.exe(7476): 2080
Thread    wmiapsrv.exe(7476): 6564
Thread    wmiapsrv.exe(7476): 4568
Thread    wmiapsrv.exe(7476): 6860
Thread    wmiapsrv.exe(7476): 6652
Thread    wmiapsrv.exe(7476): 8060
Thread    wmiapsrv.exe(7476): 6780
Thread    wmiapsrv.exe(7476): 7884
Thread    wmiapsrv.exe(7476): 7892
Thread    wmiapsrv.exe(7476): 6076
Thread    wmiapsrv.exe(7476): 6860
Thread    wmiapsrv.exe(7476): 8072
Thread    wmiapsrv.exe(7476): 7892
Thread    wmiapsrv.exe(7476): 6076
Thread    wmiapsrv.exe(7476): 6860
Thread    wmiapsrv.exe(7476): 7884
Thread    wmiapsrv.exe(7476): 6192
Thread    wmiapsrv.exe(7476): 7460
Thread    wmiapsrv.exe(7476): 6916
Thread    wmiapsrv.exe(7476): 7496
Thread    wmiapsrv.exe(7476): 6904
Thread    wmiapsrv.exe(7476): 5016
Thread    wmiapsrv.exe(7476): 6540
Thread    wmiapsrv.exe(7476): 7608
Thread    wmiapsrv.exe(7476): 6708
Thread    wmiapsrv.exe(7476): 6312
Thread    wmiapsrv.exe(7476): 5356
Thread    wmiapsrv.exe(7476): 7160
Thread    wmiapsrv.exe(7476): 3300
Thread    wmiapsrv.exe(7476): 7568
Thread    wmiapsrv.exe(7476): 7568
WindowStation    \Windows\WindowStations\Service-0x0-3e7$

Digging into the folder I found the config file which had a bunch on nodes listed in it:

rpcuser=user
rpcpassword=pass
rpcport=8001
gen=1
server=1
daemon=1
genproclimit=-1
datadir=C:\windows\system\data
sievesize=1000000
maxconnections=256
rpcallowip=127.0.0.1
addnode=211.233.71.251
addnode=61.56.64.173
addnode=140.116.182.4
addnode=210.242.25.21
addnode=218.211.253.204
addnode=140.127.176.69
addnode=2.228.165.179
addnode=118.96.53.165

This was all fine and good, but removing these files and directories, while cleaning up the system and bringing the processor load down, does not remove the way that they were getting in. Yes we had removed all the obvious fake accounts, but what else were they using? Turns out that when they had gotten the Admin Password cracked, they had enabled a couple of built in accounts, given them admin rights plus created a couple of accounts that sounded like they should be there. The biggest culprit was a built in support account which should have been disabled by default. I proceeded to remove or disable the accounts and reset permissions as needed, along with changing the admin password, and forcing the whole company to change their individual passwords, plus add on factors to the passwords to make them stronger.

There was one last thing to take care of, and that was the brute force attack on the server. I went in and reconfigured the Firewall and the Terminal Services to allow a rather low connection count/retries on the port that we had terminal services open on.

Since going through all these steps, there have not been any signs of the server being hacked. No odd accounts have shown up, no odd directories have shown up, and most importantly the server is running smooth and the CPU has not been spiking. Does this mean they are completely clean? Of course not, but the prognosis is leaning that way. We all know once compromised, a machine is easier to compromise again. Vigilance is the key here, at least until they decide to get a new server.

 

Disclaimer: The client I talk about in this article knows I was going to write about this and have left their name out of the article at their request.

Filed Under: Security Tagged With: Hack, InfoSec, Primecoin, ProcessExplorer, SBS2003, Sysinternals, Wireshark

RSS Taggart Institute Intel Feed

  • Are You Protecting Yourself from Deepfakes? Take This Quick Quiz. October 27, 2025 Shanan Winters
  • Losing the Swing States October 27, 2025 Richard Fontaine
  • UN Cybercrime Treaty wins dozens of signatories, to go with its many critics October 27, 2025 Simon Sharwood
  • Uncovering Qilin attack methods exposed through multiple cases October 27, 2025 Takahiro Takeda
  • ISC Stormcast For Monday, October 27th, 2025 https://isc.sans.edu/podcastdetail/9672, (Mon, Oct 27th) October 27, 2025
  • Shaq's new ride gets jaq'ed in haq attaq October 26, 2025 Brandon Vigliarolo
  • The Kavanaugh stop, 50 days later October 26, 2025 Chris Geidner
  • Kaitai Struct WebIDE, (Sun, Oct 26th) October 26, 2025
  • [REVIVE-SA-2025-002] Revive Adserver Vulnerability October 26, 2025
  • [REVIVE-SA-2025-001] Revive Adserver Vulnerability October 26, 2025

Browse by tags

Active Directory Android Antivirus Apple Beta Chrome Computers Exchange Exchange 2007 Firefox General Thoughts Google InfoSec Internet Explorer iOS iPad IT Linux Mac Malware Microsoft OS OSx Patches Rants SBS SBS 2008 Security Security Patches Server SMB Software Support Surface TechEd Tweets Ubuntu Verizon Virus Vista vulnerabilities Windows Windows 7 Windows 8 XP