SageTV Community  

Go Back   SageTV Community > General Discussion > The SageTV Community
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

The SageTV Community Here's the place to discuss what's worth recording, HTPC deals at retail stores, events happening outside of your home theater, and pretty much anything else you'd like. (No For-Sale posts)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-01-2010, 06:44 PM
SteveD's Avatar
SteveD SteveD is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Alabama
Posts: 228
Security

Someone is trying to hack my Sagetv Server. I use bitvise for remote access. They are trying to break through on the WinSSHD/Sagetv server. Any suggestions on how to prevent the attack or make the system more secure. Windows XP service pac 3. I don't want to stop using my webserver, squeezebox, and remote access. Any apps out there, I can't use McAfee, crashes my server.

Suggestions Please.
__________________
Serv:ECS H61H2-T1 ITX I7 3770S CPU@3.1GHZ 8G Ram WIN1064 HDPVR, HD Homerun|network encoder Unraid Server:B75MU3B I5-3550 CPU@3.30GHz 9TB 16G Ram|Network HDPVR encoder:Win10 VM 8G Ram with Processor passthrough. Directv Http tuning to Genie, exemultitunplugin to Genie client. Http scheduled task bat file to defeat screensaver on Genie. Usb uirt scheduled task bat file to defeat screensaver on Genie client. Clients Android TV, Samsung TAB A
Reply With Quote
  #2  
Old 11-01-2010, 07:12 PM
reggie14 reggie14 is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Maryland
Posts: 2,760
Quote:
Originally Posted by SteveD View Post
Someone is trying to hack my Sagetv Server. I use bitvise for remote access. They are trying to break through on the WinSSHD/Sagetv server. Any suggestions on how to prevent the attack or make the system more secure. Windows XP service pac 3. I don't want to stop using my webserver, squeezebox, and remote access. Any apps out there, I can't use McAfee, crashes my server.
What makes you think someone is trying to hack into your server?

What firewall are you running now? Presumably you're running a regular, consumer-grade wireless router with NAT. Is your Sage server configured to be on the DMZ, or have you forwarded the SageTV/WinSSHD ports to it.

I'm not really sure you have reason to be terribly concerned (assuming you're using strong passwords). You'd expect a certain amount of port scanning. I wouldn't even be surprised to see some invalid login attempts from WinSSHD. You can't really stop those, since as long as your machine on the Internet with either a publicly addressable IP or forwarded ports, people outside your network will be able to contact it.

I don't think McAfee's (or Norton's, etc.) software firewall would be a big help. The software firewall in WinXP SP2/3 is actually pretty good, so you might as well just use that. But, probably the attack traffic your seeing is happening over the SageTV and WinSSHD ports, and any other ports you've had to open up.

If you're really, really concerned, you could set up a VPN gateway on your network, and basically block all incoming connection attempts to your network except to your VPN gateway. There are lots of ways to set something like that up. You could buy a standalone device, like a Cisco RVL200, for about $160. Or, with some effort and the right wifi router, you could install the DD-WRT firmware and get OpenVPN running on it. Or, if you have an old machine with 2 NICs sitting around somewhere, you could set up a dedicated firewall box running ClearOS or pfSense.
Reply With Quote
  #3  
Old 11-01-2010, 07:13 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
That's actually a good question. Right now my only security is being behind a NAT and on port 8080, is that enough to thwart most attacks or am I less secure than I think?
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)
Reply With Quote
  #4  
Old 11-01-2010, 07:38 PM
reggie14 reggie14 is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Maryland
Posts: 2,760
Quote:
Originally Posted by evilpenguin View Post
That's actually a good question. Right now my only security is being behind a NAT and on port 8080, is that enough to thwart most attacks or am I less secure than I think?
A NAT router serves as a halfway decent firewall. Unless you have a good reason to do otherwise, you should probably make sure you can't access your router's configuration page without being on your network. Is port 8080 the only port you've forwarded?

Really, using port 8080 doesn't help you when it comes to security. It's a common port for HTTP traffic, so its not really going to to trick hackers. Mainly it helps because cable/DSL companies have a tendency to block incoming port 80 traffic to discourage you from running servers.

I've always been a little nervous about security. While Java is a relatively safe language to program in, you can still certainly screw things up on the security side. Frankly, I'd be surprised if the Sage developers have any real training writing secure code.

The web server worries me a bit more. A quick check suggests its still running Jetty version 6.1.19, which has some known vulnerabilities. None of them seem to be too bad though. But I kind of wonder about how secure some aspects of it are. For instance, has anyone tried a shell injection attack on the "Custom Transcode Mode" box on the streaming option pages? I haven't tried it, but it wouldn't surprise me if there's a vulnerability there. If that is there, then it would give any attacker that breaks into your SageTV webserver page the ability to run arbitrary commands at the command line. That would give even more reason to turn off regular HTTP access and switch to HTTPS only.
Reply With Quote
  #5  
Old 11-01-2010, 08:09 PM
SteveD's Avatar
SteveD SteveD is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Alabama
Posts: 228
Repeated login attempts on WinSSHD. The log files show the attempts, and it is showing in event viewer. My DSL router is bridged to A Cisco wireless router. Ports are forwarded for web server, remote, and squeezebox. Remote administration of the router is turned off. I reconfigured the remote user, to user only, no admin rights on the server. I am current using windows xp built in firewall, and microsoft essential with exclusions on all video shares. This did not start happening until I moved WinSSHD to port 22.

Person trying to login using root and administrator as username, and password as the password. I would think after they had not gotten there fill of playing with it. But when I got home from work, they were still at it. They will be sadly disppointed if they ever get in, just a lot of video.
__________________
Serv:ECS H61H2-T1 ITX I7 3770S CPU@3.1GHZ 8G Ram WIN1064 HDPVR, HD Homerun|network encoder Unraid Server:B75MU3B I5-3550 CPU@3.30GHz 9TB 16G Ram|Network HDPVR encoder:Win10 VM 8G Ram with Processor passthrough. Directv Http tuning to Genie, exemultitunplugin to Genie client. Http scheduled task bat file to defeat screensaver on Genie. Usb uirt scheduled task bat file to defeat screensaver on Genie client. Clients Android TV, Samsung TAB A

Last edited by SteveD; 11-01-2010 at 08:28 PM.
Reply With Quote
  #6  
Old 11-01-2010, 09:10 PM
david1234 david1234 is offline
Sage Aficionado
 
Join Date: Nov 2007
Location: Beaverton, OR
Posts: 313
Quote:
Originally Posted by SteveD View Post
Repeated login attempts on WinSSHD. The log files show the attempts, and it is showing in event viewer. My DSL router is bridged to A Cisco wireless router. Ports are forwarded for web server, remote, and squeezebox. Remote administration of the router is turned off. I reconfigured the remote user, to user only, no admin rights on the server. I am current using windows xp built in firewall, and microsoft essential with exclusions on all video shares. This did not start happening until I moved WinSSHD to port 22.

Person trying to login using root and administrator as username, and password as the password. I would think after they had not gotten there fill of playing with it. But when I got home from work, they were still at it. They will be sadly disppointed if they ever get in, just a lot of video.
While your in there, I would go ahead and block the IPs of the system that seems to be trying to get in.
Reply With Quote
  #7  
Old 11-01-2010, 09:36 PM
reggie14 reggie14 is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Maryland
Posts: 2,760
Quote:
Originally Posted by SteveD View Post
This did not start happening until I moved WinSSHD to port 22.
That basically makes sense. There really isn't a commonly used alternative to port 22, so I think people doing scanning are likely to only look for ssh traffic on port 22. Why did you change the port?

Quote:
Originally Posted by SteveD View Post
Person trying to login using root and administrator as username, and password as the password. I would think after they had not gotten there fill of playing with it. But when I got home from work, they were still at it.
Do they keep trying only user names "root" and "administrator" with "password" as the password? If that's true, I don't think this is really worth worrying about.

The WinSSHD documentation claims that it enforces delays when credentials are incorrect (although I don't know if they're constant-length delays or exponential), and it even claims it will automatically block the IP address of repeat offenders. You might want to send an email to the WinSSHD developers if it doesn't look like that's working.

Quote:
Originally Posted by david1234 View Post
While your in there, I would go ahead and block the IPs of the system that seems to be trying to get in.
It sounds like the OP is running the stock Cisco firmware, which might not let you easily configure the firewall to block an IP.
Reply With Quote
  #8  
Old 11-02-2010, 03:27 AM
SteveD's Avatar
SteveD SteveD is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Alabama
Posts: 228
Changed to port 22 so I could access the system from work. The other port I was using was blocked. I'm not sure if it had anything to do with it, but when my wife attempted to watch tv, sage was hosed until i did a reboot. Stopping and restarting the service did not help.


I have an old wrt54g that has the DD-WRT running on, stop using it because wireless began to fail while it was original cisco software. Changed firmware attempting to fix. But I could install it between switch and current wireless router if is has better filtering capabilities.
__________________
Serv:ECS H61H2-T1 ITX I7 3770S CPU@3.1GHZ 8G Ram WIN1064 HDPVR, HD Homerun|network encoder Unraid Server:B75MU3B I5-3550 CPU@3.30GHz 9TB 16G Ram|Network HDPVR encoder:Win10 VM 8G Ram with Processor passthrough. Directv Http tuning to Genie, exemultitunplugin to Genie client. Http scheduled task bat file to defeat screensaver on Genie. Usb uirt scheduled task bat file to defeat screensaver on Genie client. Clients Android TV, Samsung TAB A

Last edited by SteveD; 11-02-2010 at 03:42 AM.
Reply With Quote
  #9  
Old 11-02-2010, 07:02 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
i say to be safe setup a pfSense box to act as your one stop show. I have this sitting right behind my cable modem and just before my 24port gigabit switch. It will allow you to do pretty well anything.

DMZ
VPN,
FIREWALL,
NAT,
so on and so forth.

Its super easy to setup and will allow you the flexibility in my opinion for a pretty stinkin secure network.

Oh yeah you can see traffice logs which will alert you of attacks and stuff like that too.

http://www.pfsense.org/?gclid=CLKBus...FQIGbAodqT9VQA

~Pix64
Reply With Quote
  #10  
Old 11-02-2010, 07:58 AM
reggie14 reggie14 is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Maryland
Posts: 2,760
SteveD-

As I'm sure you realize, you're somewhat limited in what you can do. If you want to be able to remotely access your computer from anywhere, anyone else can remotely access it (although, hopefully not log in).

In general, programs implemented with security in mind should be OK. WinSSHD doesn't have much documentation available. You'd expect WinSSHD to enforce some type of delay (hopefully an increasing delay) for invalid login attempts, to limit the number of guesses. It might also block IPs of users that have done many invalid login attempts in a row. I'm not sure what the limit on that would be. I'd probably put it at 10 or 20. Like I suggested before, I think you should contact WinSSHD and figure out if you have anything to worry about.

Running something like pfsense seems like overkill, based on what it sounds like your needs are. It might make a bit more sense if you also wanted a VPN gateway, but I doubt you'd be able to use that from work. I doubt you're seriously threatened right now, so it doesn't seem worth it to send the extra money each month on electricity to power an old computer running pfsense.

You could use the old WRT54G as a firewall. It could be a little tricky to set up, since you probably don't want two levels of NAT. What cisco wifi router do you have? Many of the newer ones will run DD-WRT too.

Another possibly simpler option is to change your WinXP firewall settings. WinXP doesn't have a nice GUI for creating custom firewall rules, but you can pretty easily set it up so only IPs in a certain range can poke through your firewall. So, if you only care about accessing your box from work, you could just put in your workplace's IP range in the WinXP firewall settings for port 22. You might be able to add custom firewall rules at the command line to do things like drop traffic from a certain IP. I'm not sure though.

But I also don't think it makes sense to go to great trouble to block a specific IP. If you're running with port 22 open, potential hackers will see it when doing port scans, and some will try a small number of commonly used passwords. I wouldn't worry too much unless you see someone running though a few thousand dictionary words (which you shouldn't be using as a password anyway), as that sort of implies someone has singled your box out.
Reply With Quote
  #11  
Old 11-02-2010, 09:22 AM
DevNull DevNull is offline
Sage User
 
Join Date: Nov 2008
Posts: 18
SSH servers are typically attacked using a dictionary style method. It can quickly fill up your logs with these attacks and potentially slow your net connection/server. One way to thwart any chance of them guessing correctly is to switch to public key authentication. Once you have it configured properly, you should be able to disable the standard login/password authentication. This will cause the SSH server to quickly punt anyone who tries to connect via the "old" method.

For additional info, see this page for more security tips for WinSSHD.
Reply With Quote
  #12  
Old 11-02-2010, 10:19 AM
reggie14 reggie14 is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Maryland
Posts: 2,760
Quote:
Originally Posted by DevNull View Post
SSH servers are typically attacked using a dictionary style method. It can quickly fill up your logs with these attacks and potentially slow your net connection/server. One way to thwart any chance of them guessing correctly is to switch to public key authentication. Once you have it configured properly, you should be able to disable the standard login/password authentication. This will cause the SSH server to quickly punt anyone who tries to connect via the "old" method.
That's a very good suggestion. I didn't realize you could configure WinSSHD that way. And the OP should still be able to log in from work.
Reply With Quote
  #13  
Old 11-05-2010, 07:24 AM
Polypro Polypro is offline
Sage Icon
 
Join Date: Jun 2005
Posts: 1,804
I would set up the free version of Hamachi. Total access to anything you want, not one port open to the net. Use it with the free Team Viewer for remote admin. All you ever need to do is type in the 5.xxx.xxx.xxx address into anything and your in...since it's a VPN, no one else can access anything.

P
Reply With Quote
  #14  
Old 11-05-2010, 02:16 PM
Peter_h Peter_h is offline
Sage Fanatic
 
Join Date: May 2008
Location: Kailua, HI
Posts: 798
Yeah, I would turn off all forwarded ports and rely on a secured VPN connection. Generate a key with something like openvpn. If your router is flashed with DD-wrt it will support this.

For work access you install Hamachi/logmein/gotomypc on your sage server.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Placeshifter Security phunny SageTV Placeshifter 2 04-28-2006 06:03 AM
Sage UI Security jtt88 SageTV Customizations 5 12-23-2004 06:41 PM
Client Security dagar SageTV Software 4 10-28-2004 10:02 AM


All times are GMT -6. The time now is 05:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.