Sending Skinny / sccp message to iKettle using TCP in command line / unix - tcp

I'm trying to access my "smart kettle",
first I entered it's own, unencrypted Wi-Fi and typed nmap 192.168.1.1, these ports are open:
23/tcp open telnet
80/tcp open http
2000/tcp open cisco-sccp
accessing port 23 with telnet was easy,
now I'm searching for a tool to send hex messages to port 2000 to turn on/ shut down the device.
Is there a tool to send skinny protocol messages?
And if not, how could I communicate with port 2000 over the command line?
Thanks in advance!

Related

How can i run UDP client and server on two seperate computers?

I have a command line program using UDP socket and a UDP hub server running fine on my local host with seperate command prompts. Each the server and the client are bidirectional, so they both need to be able to send and recieve from each other.
I think that all i need to do to make them run on two seperate computers is to change the IP addresses and port numbers respectively. I think i will need to use the private IPV4 address because my socket is UDP IPV4. But i can't confirm because I do not have two different computers. Can someone please reassure me?
For instance, let's say I have basic UDP client and UDP server:
UDP Client is running on a computer with IPV4 162.16.156.1
UDP server is running on a computer with IPV4 162.18.200.1
UDP server should:
- bind to 162.18.200.1
- send to 162.16.156.1
- recieve would happen at 162.18.200.1
UDP client should:
- connect to 162.18.200.1
- send to 162.18.200.1
- recieve would happen at 162.16.156.1

How do I open a port in Windows 10 for use?

I need to open port#42474 on my Windows 10 system for penetration testing purposes.
I added it to the inbound list of my Windows Defender Firewall (both TCP and UDP protocol), and it is enabled.
However, whenever I am trying to ping this port on my machine using telnet it is throwing an error as
Connecting To localhost...Could not open connection to the host, on port 42474: Connect failed
I am able to use telnet to ping other sites such as google.com. But not this port on my machine. Below is the command I am running to test the port and the error:
Port
Telnet error
telnet localhost 42474
Do I need to do anything else to open port#42474?
How do I verify if this port is available for use?
TCP ports are bi-directional, so check these tips:
Verify your service on this port is running: netstat -a
Be sure your firewall isn't blocking (try to deactivate it: if it works well, your rule isn't correct)
Search for your service log: maybe,
it receive information, but it's not able to reply. I recommend you to use PuTTY or Kitty (which is my favorite, because it's portable without registry keys modification), and try to connect on this port.
If you need a tool that able to listen on the port, see this post: Utility to open TCP port to listen state and netcat.
You can use the Python programming language. More specifically, the socket library:
import socket
hote = "localhost"
port = 4444
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect((hote, port))
print "Connection on {}".format(port)
socket.send(u"Hey my name is Abdx!")
print "Close"
socket.close()

Communication between 2 ESP8266 WiFi modules without router using AT commands

I'm trying to make a TCP based communication to send a simple message "Hello" from one ESP8266 module to another using this document. I'm using 2 USB to TTL as hardware and Realterm as serial terminal.
I could do it when ESP8266 modules are connected to a router, sending AT commands as below,
Set the Server:
AT+CWJAP="AccessPointName","Password"//Join to your WiFi network
AT+CIPMUX=1//0 for single connection 1 for multiple connection.
AT+CIPSERVER=1,1336//Set as Server. 1 to open Server mode(0 to close). 1336 is port.
AT+CIFSR//Get IP address (STAIP 192.168.43.151)
Set the Client:
AT+CWJAP="AccessPointName","Password"
AT+CIPMUX=1
AT+CIPSTART=1,"TCP","192.168.43.151",1336//Set up TCP or UDP connection, the 4 parameters are id, type, adress and port.
AT+CIPSEND=1,7// Channel and number of bytes to send
//After issuing all previous command you will receive "OK". But afterAT+CIPSENDyou will receive a ">" as response.
Hello//send your Data
I want to connect both ESP8266 to each other without a router.
So I used these AT commands:
Server commands:
AT+CIPMUX=1
AT+CWMODE=3//set the module as a client and also an access point.
AT+CIPSERVER=1,1336
AT+CIFSR //Getting 2 ip address (APIP 192.168.4.1 and STAIP 0.0.0.0).
Client commands:
AT+CIPMUX=1
AT+CWMODE=3
AT+CWJAP="ESP1 SSID", "ESP1 PWD" //Connect to server
AT+CIPSTART=1,"TCP","0.0.0.0",1336 // I also tried APIP 192.168.4.1.
But when I send CIPSTART command I get ERROR message.
What's going wrong? What should I do?
In the context of a route entry, the 0.0.0.0 means the default route. In the context of servers, 0.0.0.0 means all IPv4 addresses on the local machine. If a host has two IP addresses, 192.168.1.1 and 10.1.2.1, and a server running on the host listens on 0.0.0.0, it will be reachable at both of those IPs. This type of communication is also known as WiFi P2P or Wifi direct. It should work properly with your commands! If problem persists try with different modules.
I changed modules and it's working now.
The Server Commands:
AT+CWMODE=3
AT+CIPMUX=1
AT+CIPSERVER=1,222
AT+CIFSR
/*the server response to CIFSR is:
+CIFSR:APIP,"192.168.7.7"
+CIFSR:APMAC,"a2:20:a6:10:50:2c"
+CIFSR:STAIP,"0.0.0.0"
+CIFSR:STAMAC,"a0:20:a6:10:50:2c"*/
The Client commands:
AT+CWMODE=3
AT+CWJAP="SERVER_SSID","SERVER_PASS"
AT+CIPMUX=1
AT+CIPSTART=2,"TCP","192.168.7.7",222
AT+CIPSEND=2,7
HELLO

how applications using same service communicate ?

I am confused that if ports serve to distinguish the applications , so as to tell to which particular application data packet belongs , then if i have two browsers both downloading file using FTP , how would packet be distinguished to which brower it is going, as FTP uses port 21 ?
FTP is not the best example as it's behaviour change depending on Active/Passive mode.
Consider HTTP instead, which is simplier.
Browser_A initiates a TCP connection to ServerIP:80
PC assigns a random port, example HostIP:55123
TCP Connextion between HostIP:55123 and ServerIP:80 is established
Server receives a request and responds to HostIP:55123
PC knows every TCP packet from ServerIP:80 to 55123 should be delivered to Browser_A
First of all port 21 is COMMAND port, so when downloading file for sure FTP clients will not be connected to port 21.
Secondly, a connection is established from a high port (> 1024) to the FTP data port, so your browsers will open (in PASSIVE mode) a connection from a high port.
Answering to your question, if you open 2 browsers and start downloading data from FTP server, every browser will connect from a different port.

How to try out HTTP, FTP, SMTP etc. application protocols

I am reading Computer Networking: A Top-Down Approach 5th (fifth) edition. I have reached chapter two and I wonder if it is possible to actually try out the different application protocols by writing the requests etc? I am using Windows if that matter if you need a tool for doing that, and if I need a tool, what does the tool do behind the scenes for connecting?
You should use telnet to connect to all of these protocol, do your request, reading the answer and so on.
I'm reading that telnet is disabled by default on newer windows version (unbelievable, why? Thank goodness I stopped using it!)... Follow this guide to re-enable it if you're using a windows version newer than xp.
Telnet was used to remotely login to a host. Today it's completely unsafe to use it in this way, as long as a telnet connection isn't encrypted and we have such a better tool like ssh for remote connection. However, you can think to Telnet as a generic TCP client. It can establish TCP connection on every port.
By default, it will try to attempt to connect to port 23 (that is the telnet port) but you can easily change that.
For example, if you want to test HTTP, you can write in your command line:
~$ telnet www.example.com 80
Trying 192.0.43.10...
Connected to www.example.com.
Escape character is '^]'.
Where 80 is the http port (of course, if you're running it locally, you should connect to localhost). Other lines state the connection is ready to receive a request. Now you can type any http command you want.
GET /
HTTP/1.0 302 Found
Location: http://www.iana.org/domains/example/
Server: BigIP
Connection: close
Content-Length: 0
Where GET / is the command I typed and the rest is the http response.
Changing the port number, you can speak to (almost?) every protocol in the internet.
Well you can them out like this.... just to name a few...
Ftp : ftp ip_addr or ftp domain_name
Telnet : telnet ip_addr or telnet ip_addr:port_no or tracert domain_name
tracert : tracert ip_addr or tracert domain_name
ping : ping ip_addr or ping domain_name

Resources