.

opening a port through command promt.

<<

proudindian

Newbie
Newbie

Posts: 32

Joined: Mon Dec 10, 2007 3:24 am

Post Mon Dec 31, 2007 3:54 am

opening a port through command promt.

can you provide me the information how we can open a port through command promt????
<<

venom77

User avatar

Hero Member
Hero Member

Posts: 1905

Joined: Mon Dec 11, 2006 3:23 pm

Post Mon Dec 31, 2007 9:47 am

Re: opening a port through command promt.

Umm.. can you elaborate a little on what you're trying to accomplish?
<<

proudindian

Newbie
Newbie

Posts: 32

Joined: Mon Dec 10, 2007 3:24 am

Post Mon Dec 31, 2007 12:06 pm

Re: opening a port through command promt.

i want to run a programme in a port so,how i can open that port through cmd?
<<

pseud0

User avatar

Recruiters
Recruiters

Posts: 210

Joined: Sat Nov 17, 2007 8:26 pm

Location: Detroit, Michigan

Post Mon Dec 31, 2007 12:24 pm

Re: opening a port through command promt.

I'm not 100% clear on what you want, but the way to think about this is that you run a program and it is assigned a port by the OS.  You don't open a port then relate it to a program.  It would help if we knew why you were opening the port.  What is it supposed to do?
CISSP, CISM, CISA, GCIH, GREM, CEH, HMFIC, KTHXBIROFLCOPTER
<<

proudindian

Newbie
Newbie

Posts: 32

Joined: Mon Dec 10, 2007 3:24 am

Post Mon Dec 31, 2007 12:41 pm

Re: opening a port through command promt.

want to know how a remote port can be open..and how we can connect to the port and run a programme in a system...
<<

Kev

Sr. Member
Sr. Member

Posts: 428

Joined: Sat Sep 29, 2007 12:26 pm

Post Mon Dec 31, 2007 12:54 pm

Re: opening a port through command promt.

You need to study netcat. Then learn a little coding and you can assign a port to open in your program as long as there in no conflict. You cant just open a port with a windows command in the command prompt.
<<

g00d_4sh

User avatar

Sr. Member
Sr. Member

Posts: 394

Joined: Tue Sep 18, 2007 1:50 pm

Location: Guayaquil, Ecuador

Post Mon Dec 31, 2007 1:03 pm

Re: opening a port through command promt.

Ahhh... so you wish to know how to open a port on a remote system.  Such as port 23 for telnet or whatnot.   Well, if the port is closed, you're going to need to either run an exploit that drops a shell, or utilize what is open in an inginuitive way... such as is shown in this month's challenge. I'm of course assuming you want to open a port on a remote computer and not your own.
"Bad.. Good?  I'm the guy with the gun"
<<

morpheus063

User avatar

Sr. Member
Sr. Member

Posts: 393

Joined: Sun Jun 25, 2006 10:08 am

Location: Cochin - India

Post Mon Dec 31, 2007 9:02 pm

Re: opening a port through command promt.

What he is trying to convey his, he want to open a closed port on a remote machine, so that he can get connected.

Correct me if i am wrong.
Manu Zacharia
MVP (Enterprise Security), ISLA-2010 (ISC)², C|EH, C|HFI, CCNA, MCP,
Certified ISO 27001:2005 Lead Auditor

[b]There are 3 roads to spoil; women, gambling & hacking. The most pleasant with women, the quickest with gambling, but the surest is hacking - c0c0n
<<

proudindian

Newbie
Newbie

Posts: 32

Joined: Mon Dec 10, 2007 3:24 am

Post Tue Jan 01, 2008 3:31 am

Re: opening a port through command promt.

yes,most of the times telnet port is closed,yes,i want to open a closed port on a remote machine.....

But how....???
<<

Kev

Sr. Member
Sr. Member

Posts: 428

Joined: Sat Sep 29, 2007 12:26 pm

Post Tue Jan 01, 2008 4:21 am

Re: opening a port through command promt.

There needs to be a service or program on the other machine that is responding to your command on the remote machine. For instance, If I have managed to have installed a trojan on the remote box, I can have that respond back to me on a port of my choosing as long as there is not a conflict.
<<

0cyberkill0

User avatar

Newbie
Newbie

Posts: 3

Joined: Sat Jan 19, 2008 7:51 pm

Post Sat Jan 19, 2008 7:58 pm

Re: opening a port through command promt.

First off you should try scanning the ip with a port scanner. If the telnet port is closed than your best chance  would be to nbtstat their computer... You can google it and find tutorials on how to do it. Note though nbtstat will only work if the victim has file sharing enabled...
----->000000CYBERKILL00000<--------
<<

don

User avatar

Administrator
Administrator

Posts: 4226

Joined: Sun Aug 28, 2005 10:47 pm

Location: Chicago

Post Sat Jan 19, 2008 11:41 pm

Re: opening a port through command promt.

Think of ports as being like phones. If a phone is unplugged, your call will not be recieved. So you can call all you want, and you'll continue to get no response. If the phone is plugged in, then it will recieve your call. What it does with that call (talk to someone, VM, call forwarding, fax, etc.) depends on what service it offers. If the phone is on, but there is a block on certain numbers calling in or it possibly only allows outbound calls and not incoming calls, that is like a firewall. I could go on with this analogy, but I think you get the point.

So being able to open a port would like asking someone to plug in the phone that uses the number you happen to be calling. Or in your case, if you manage to get a command prompt, then plug in the phone yourself... start a service. Either start one that the system already has on it but not running or upload one of your own like netcat in listening mode. Now your phone is on and ready to provide a service.

On the other hand, if there is a firewall in place, then you may have to contend with that, too.

Hope this helps,
Don

PS - Welcome to EH-Net 0cyberkill0.
CISSP, MCSE, CSTA, Security+ SME
<<

jigkin22

Newbie
Newbie

Posts: 4

Joined: Sun Mar 09, 2008 3:52 pm

Post Sat Mar 29, 2008 12:44 pm

Re: opening a port through command promt.

Thanks you all of you guys whoever posted their views. However, which things do i have to get in order to connect or open port of the remote pc? Example: IP address and MAC address? I have my friend's static ip address and mac address and he is running windows XP with service pack 2. Now which program should i use in order to get established connection? Please help. My concept is clear about opening a post but not sure about programming. Also, even if i get the program, how would i send to him pc?

Please someone clear my confusion.....thanks bros.

g.
<<

eth3real

User avatar

Sr. Member
Sr. Member

Posts: 309

Joined: Wed Feb 27, 2008 10:35 am

Location: US

Post Sat Mar 29, 2008 2:22 pm

Re: opening a port through command promt.

Unless you have permission from your friend to do this, it is illegal.

You already know that he is using Windows XP SP2. Use a program like Nmap to find out what else he might be running on his computer. If he is using a firewall, you will see that a lot of ports show up as "filtered". You have to find open ports, and try to exploit whatever he may be running (for example, if he is running an Apache server, find out what version he is running and search for known exploits for that version). If that doesn't work, try social engineering (to trick your friend into installing a service that will give you the desired exploit), or, if you have access to the computer itself, you can log on and install a program. If you don't know the password, you can use something like the "Offline NT Admin" disc to reset a password, such as the Administrator account. If he doesn't have antivirus software, you can easily install something like the backdoor "tini", or Abel.dll, either of which will give you a remote command prompt.

If you don't know where to find these tools, use Google.

This thread has given you all of the necessary steps to own a computer.
Put that in your pipe and grep it!
<<

RoleReversal

User avatar

Hero Member
Hero Member

Posts: 928

Joined: Fri Jan 04, 2008 8:54 am

Location: UK

Post Sun Mar 30, 2008 3:47 am

Re: opening a port through command promt.

jigkin22,

assuming you have permission to communicate with your friends computer then, as others have stated, you will need to install/enable a service to enable that communication. Taking it a bit further you could try looking at the likes of Remote Desktop or VNC.

However, as eth3real as stated, if you don't have permission then what you are attempting is illegal and you may be at the wrong forum. try unethicalhacker.net instead.

Hopefully you are in the right place and will be able to use all of the advice that has been supplied so far. Happy hunting
Next

Return to Tools

Who is online

Users browsing this forum: No registered users and 1 guest

.
Powered by phpBB® Forum Software © phpBB Group.
Designed by ST Software