View Single Post
Old 12-04-2011, 03:54 PM   #26
PoP
ɹͬᵣͬ ǝͤₑͤ 彡 ᶻᵒᵒᵐ∫
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 474
Karma: 4068311
Join Date: Dec 2010
Location: ♁ ᴺ₄₅₃₀' ᵂ₇₃₃₇' ₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
I can't get Launchpad's RCE to work

Quote:
Originally Posted by h1uke View Post
I've added a primitive RemoteCommandEntry feature to the existing launchpad code.
When started, it now joins the 239.1.2.3 multicast group and listens for UDP packets
on port 10000 of usb0 interface. Each packet (can be up to 1024 bytes in length).
When RCE enabled, the contents of every incoming packet gets conveyed to the system shell.

All RCE parameters mentioned above are controlled by rce.ini configuration file.
I have configured my RCE.ini parameters as follows:
Spoiler:

[RemoteCommandEntry]

;; comment out AutoEnable and enableRCE definitions below
;; in order to fully disable the RCE feature

AutoEnable = yes
enableRCE = start RCE
disableRCE = stop RCE

Interface = wlan0
MulticastGroup = 239.1.2.3
Port = 10000

I have opened the port in the firewall:
Spoiler:

iptables -A INPUT -i wlan0 -p udp --dport 10000 -j ACCEPT

And I am using This freeware UDP test tool to send UDP packets (containing shell commands) to the Kindle.

My wlan0 interface seems healthy:
Spoiler:

[root@kindle root]# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1449 errors:0 dropped:0 overruns:0 frame:0
TX packets:1449 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:408369 (398.7 KiB) TX bytes:408369 (398.7 KiB)

wlan0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.2.9 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11383 errors:0 dropped:0 overruns:0 frame:0
TX packets:1984 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2715897 (2.5 MiB) TX bytes:276735 (270.2 KiB)


It recieves unicast UDP packets on port 10000:
Spoiler:

Before sending the packet

[root@kindle root]# iptables --list --verbose
Chain INPUT (policy DROP 6229 packets, 681K bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- ppp0 any anywhere anywhere tcp dpt:40317
0 0 ACCEPT tcp -- ppp0 any anywhere anywhere state RELATED,ESTABLISHED
101K 78M ACCEPT tcp -- wlan0 any anywhere anywhere state RELATED,ESTABLISHED
439 74280 ACCEPT udp -- wlan0 any anywhere anywhere state ESTABLISHED
0 0 ACCEPT udp -- ppp0 any anywhere anywhere state ESTABLISHED
6 328 ACCEPT all -- lo any localhost.localdomain anywhere
0 0 ACCEPT all -- usb0 any anywhere anywhere
1 89 ACCEPT icmp -- any any anywhere anywhere state RELATED,ESTABLISHED
38 1968 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT icmp -- wlan0 any anywhere anywhere
3 144 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:4200
0 0 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:www
6 347 ACCEPT udp -- wlan0 any anywhere anywhere udp dpt:10000

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 61771 packets, 7450K bytes)
pkts bytes target prot opt in out source destination
6 328 ACCEPT all -- any lo anywhere localhost.localdomain


After sending one UDP packet to 192.168.2.9:10000


[root@kindle root]# iptables --list --verbose
Chain INPUT (policy DROP 6254 packets, 684K bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- ppp0 any anywhere anywhere tcp dpt:40317
0 0 ACCEPT tcp -- ppp0 any anywhere anywhere state RELATED,ESTABLISHED
102K 78M ACCEPT tcp -- wlan0 any anywhere anywhere state RELATED,ESTABLISHED
439 74280 ACCEPT udp -- wlan0 any anywhere anywhere state ESTABLISHED
0 0 ACCEPT udp -- ppp0 any anywhere anywhere state ESTABLISHED
6 328 ACCEPT all -- lo any localhost.localdomain anywhere
0 0 ACCEPT all -- usb0 any anywhere anywhere
1 89 ACCEPT icmp -- any any anywhere anywhere state RELATED,ESTABLISHED
38 1968 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT icmp -- wlan0 any anywhere anywhere
3 144 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:4200
0 0 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:www
7 385 ACCEPT udp -- wlan0 any anywhere anywhere udp dpt:10000


Per launchpad instructions, I tried enabling the RCE by first sending a packet containning the "start RCE" string. To no avail. The Kindle doesn't seem to receive UDP packets multicasted to 239.1.2.3:10000
Spoiler:

After multicasting several packets, the count does not change

[root@kindle root]# iptables --list --verbose
Chain INPUT (policy DROP 6255 packets, 684K bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- ppp0 any anywhere anywhere tcp dpt:40317
0 0 ACCEPT tcp -- ppp0 any anywhere anywhere state RELATED,ESTABLISHED
102K 78M ACCEPT tcp -- wlan0 any anywhere anywhere state RELATED,ESTABLISHED
439 74280 ACCEPT udp -- wlan0 any anywhere anywhere state ESTABLISHED
0 0 ACCEPT udp -- ppp0 any anywhere anywhere state ESTABLISHED
6 328 ACCEPT all -- lo any localhost.localdomain anywhere
0 0 ACCEPT all -- usb0 any anywhere anywhere
1 89 ACCEPT icmp -- any any anywhere anywhere state RELATED,ESTABLISHED
38 1968 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT icmp -- wlan0 any anywhere anywhere
3 144 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:4200
0 0 ACCEPT tcp -- wlan0 any anywhere anywhere tcp dpt:www
7 385 ACCEPT udp -- wlan0 any anywhere anywhere udp dpt:10000

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 61854 packets, 7468K bytes)
pkts bytes target prot opt in out source destination
6 328 ACCEPT all -- any lo anywhere localhost.localdomain


Can you help me spot what is missing?

Edit 2011-12-05 thread moved to http://www.mobileread.com/forums/sho...d.php?t=159903

Last edited by PoP; 12-10-2011 at 08:14 AM. Reason: not to hichjack
PoP is offline   Reply With Quote