Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 42 guests and 1 member online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow General Certificationarrow Networkingarrow Set gateway from router
EH-Net
May 22, 2013, 02:01:23 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: Set gateway from router  (Read 5781 times)
0 Members and 1 Guest are viewing this topic.
yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« on: October 10, 2011, 11:06:18 AM »

Interesting dilemma, I don't know if this is possible.

Topology
(corp hq)----{internet}-----[VPN router]-----(windows XP box)

IPSec VPN tunnel is up between remote VPN router and corp HQ.  Windows machine is directly connected to the internal side of the router, but no default gateway is set.

I can SSH into the router and ping the windows box, but cannot ping the windows box directly.

Is there a way to set the gateway FROM the router since that's the only way I can communicate to it?  The alternative is flying to the remote site and setting the gateway.  Ouch.

Any help would be appreciated.  I have tried a few things without success (for example, enable NAT on the router to do translation; does NOT work because the order NAT is applied versus the VPN tunnel).

Hacks are welcome as long as the remote site is recoverable afterward!  Smiley

Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #1 on: October 10, 2011, 02:39:51 PM »

So you're trying to remotely set the gateway of the Windows box but since it doesn't have a gateway, you can only get to it from the router which is on the same local network, right? Just want to be sure.

Are there any other windows boxes on that network that DO have a gateway set? What type of router are you dealing with? You can PM me if you don't want to broadcast it Smiley



Logged

yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #2 on: October 10, 2011, 05:37:38 PM »

No worries, consider this to be a generic remote office setup.  Windows XP box sitting behind a Cisco router, running the most up to date Cisco IOS 15.X.  Users use the system locally as a standalone box.  VPN is for remote training, troubleshooting, administration, updates, etc.  In this case the installer forgot to set that one little setting.....default gw.

You are correct in your understanding, so you know what my problem is.  No gateway = no routing.  One way traffic is fine, but the responses never come back.  I can get to the server from the router itself, as you say.
Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #3 on: October 10, 2011, 05:51:44 PM »

All the boxes on the remote LAN have no default gateway?
Logged

yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #4 on: October 10, 2011, 06:01:47 PM »

There is only one box, so, correct.
Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #5 on: October 10, 2011, 06:11:45 PM »

Is the remote box running ssh or telnet? Otherwise you're looking at using port forwarding on the Cisco with an ACL. This assumes you've got services even running on that box. If you have SMB running for example, you could use psexec or if the box isnt patched you could use an exploit to get a shell on it.

If you use port forwarding, and you're opening up 445 to it, make sure your ACL is tight, you dont want that thing on the Internet.

*****

Ugh just realized that PAT wont work if that box has no default gateway. hmmm. Let me think.
« Last Edit: October 10, 2011, 07:08:20 PM by cd1zz » Logged

yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #6 on: October 10, 2011, 07:14:36 PM »

No ssh or telnet, but windows file sharing is on.  I was thinking port forwarding, but i think the problem with the gateway still persists since the source addr is not changed, or am I wrong?
Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #7 on: October 10, 2011, 07:19:13 PM »

Other things I've thought of:

There is somewhat of a port of netcat for IOS called IOScat, though it has limited functionality and even still it would be the same as port forwarding.

No return traffic rules out TCP, but UDP should work?  Maybe there's an exploit that can use entirely UDP, sort of like blind sql injection but with packets, lol.

If there was a way of embedding shell + netsh command into a payload, capturing the packets and then replaying them from the router, not sure how to do that though.
Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #8 on: October 11, 2011, 08:39:11 AM »

Yeah but you'd still need a bind shell listening on that problem XP box. Is there any human being sitting at this PC? If so, I'd just send a bind shell on a usb drive, or better yet, a netsh command in a batch file and have them open it or setup an autorun script (assuming they dont have that patched).

If you can get a bind shell on that box you could use that IOScat to interface with the PC.
Logged

l33t5h@rk
Guest
« Reply #9 on: October 11, 2011, 09:10:47 AM »

better yet, a netsh command in a batch file and have them open it

This was going to be my suggestion as well. Use netsh to configure all of the network settings and you should be able to get the connection up.
Logged
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #10 on: October 11, 2011, 09:54:36 AM »

He has no way to get a remote command shell on the box though, that's the problem.
Logged

yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #11 on: October 11, 2011, 10:00:16 AM »

Yeah, thanks for the suggestions but you are right.  If only there were a way to invoke WSH or WMI from the router... ugh.
Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #12 on: October 11, 2011, 10:09:36 AM »

As you can probably tell, it really irks me that such a simple thing is getting in my way.  I keep telling myself there MUST BE A WAY.  It's just networking.  I have Cisco IOS, I have admin credentials for the box at the other end, just no way to get a TCP connection because return traffic is being dropped.
Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #13 on: October 11, 2011, 10:10:33 AM »

No human at the other end? I would just have someone go over and do it!
Logged

l33t5h@rk
Guest
« Reply #14 on: October 11, 2011, 11:30:25 AM »

No human at the other end? I would just have someone go over and do it!

Pretty much where we're at. Those damn humans keep getting in the way of productivity.
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.065 seconds with 24 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.