Jump to content

Cow Milking Robot Hacks/Mods X11


Legomaniac

Recommended Posts

For the Linux savvy ones, I found something strange. So I can login as root and I can go pretty much anywhere when I SSH into one of the robot units (terminal only). Now there is a folder called /usr/Lely, which has these contents.

/usr/Lely # ls
AGS                  Ax_A_AGS             Ax_A_RCS             LFWTimeServer        RCS.start            bootNetConf
AGS.start            Ax_A_AURS            Ax_A_XLinkUpdater    LFWTimeServer.start  Software             chrome.sh
AURS                 Ax_A_LDNTranslator   DoUpdate             PC2Target            VNC.start            killme
AURS.start           Ax_A_LFWTimeServer   LDNTranslator        Proxy                Version.txt          lelyboot
Ax_A_1024x768.qss    Ax_A_PC2Target       LDNTranslator.reset  Proxy.start          XLinkUpdater         setNetConf
Ax_A_640x480.qss     Ax_A_Proxy           LDNTranslator.start  RCS                  XLinkUpdater.start   vnc
 

So I'd say there should be a user called Lely. However, when I check all the users using cat /etc/passwd, there's no user Lely to be found.

login as: root
root@10.4.1.102's password:
sh: xauth: not found
/ # cat /etc/passwd
root:WKOt7g4Zs.7W6:0:0:root:/home/root:/bin/sh
daemon:*:1:1:daemon:/usr/sbin:/bin/sh
bin:*:2:2:bin:/bin:/bin/sh
sys:*:3:3:sys:/dev:/bin/sh
sync:*:4:65534:sync:/bin:/bin/sync
games:*:5:60:games:/usr/games:/bin/sh
man:*:6:12:man:/var/cache/man:/bin/sh
lp:*:7:7:lp:/var/spool/lpd:/bin/sh
mail:*:8:8:mail:/var/mail:/bin/sh
news:*:9:9:news:/var/spool/news:/bin/sh
uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:*:13:13:proxy:/bin:/bin/sh
www-data:*:33:33:www-data:/var/www:/bin/sh
backup:*:34:34:backup:/var/backups:/bin/sh
list:*:38:38:Mailing List Manager:/var/list:/bin/sh
irc:*:39:39:ircd:/var/run/ircd:/bin/sh
gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
messagebus:x:42:64002:Linux User,,,:/var/run/dbus:/bin/sh
haldaemon:x:43:64:HAL:/var/run/hald:/bin/sh
polkituser:x:44:64004:polkituser:/var/run/polkit:/bin/sh
/ #
/ #
 

Anyone knows what's up?

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 62
  • Created
  • Last Reply
On 2/22/2020 at 5:33 PM, Sandman said:

For the Linux savvy ones, I found something strange. So I can login as root and I can go pretty much anywhere when I SSH into one of the robot units (terminal only). Now there is a folder called /usr/Lely, which has these contents.

/usr/Lely # ls
AGS                  Ax_A_AGS             Ax_A_RCS             LFWTimeServer        RCS.start            bootNetConf
AGS.start            Ax_A_AURS            Ax_A_XLinkUpdater    LFWTimeServer.start  Software             chrome.sh
AURS                 Ax_A_LDNTranslator   DoUpdate             PC2Target            VNC.start            killme
AURS.start           Ax_A_LFWTimeServer   LDNTranslator        Proxy                Version.txt          lelyboot
Ax_A_1024x768.qss    Ax_A_PC2Target       LDNTranslator.reset  Proxy.start          XLinkUpdater         setNetConf
Ax_A_640x480.qss     Ax_A_Proxy           LDNTranslator.start  RCS                  XLinkUpdater.start   vnc
 

So I'd say there should be a user called Lely. However, when I check all the users using cat /etc/passwd, there's no user Lely to be found.

login as: root
root@10.4.1.102's password:
sh: xauth: not found
/ # cat /etc/passwd
root:WKOt7g4Zs.7W6:0:0:root:/home/root:/bin/sh
daemon:*:1:1:daemon:/usr/sbin:/bin/sh
bin:*:2:2:bin:/bin:/bin/sh
sys:*:3:3:sys:/dev:/bin/sh
sync:*:4:65534:sync:/bin:/bin/sync
games:*:5:60:games:/usr/games:/bin/sh
man:*:6:12:man:/var/cache/man:/bin/sh
lp:*:7:7:lp:/var/spool/lpd:/bin/sh
mail:*:8:8:mail:/var/mail:/bin/sh
news:*:9:9:news:/var/spool/news:/bin/sh
uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:*:13:13:proxy:/bin:/bin/sh
www-data:*:33:33:www-data:/var/www:/bin/sh
backup:*:34:34:backup:/var/backups:/bin/sh
list:*:38:38:Mailing List Manager:/var/list:/bin/sh
irc:*:39:39:ircd:/var/run/ircd:/bin/sh
gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
messagebus:x:42:64002:Linux User,,,:/var/run/dbus:/bin/sh
haldaemon:x:43:64:HAL:/var/run/hald:/bin/sh
polkituser:x:44:64004:polkituser:/var/run/polkit:/bin/sh
/ #
/ #
 

Anyone knows what's up?

I will look into this!

Link to comment
Share on other sites

So I have good news and bad news. I was able to login as root (Excellent news!) The bad news is, x11vnc that is installed on the robots doesn't seem compatible with input...

Quote

04/03/2020 08:50:08 WARNING: XTEST extension not available (either missing from
04/03/2020 08:50:08   display or client library libXtst missing at build time).
04/03/2020 08:50:08   MOST user input (pointer and keyboard) will be DISCARDED.
04/03/2020 08:50:08   If display does have XTEST, be sure to build x11vnc with
04/03/2020 08:50:08   a working libXtst build environment (e.g. libxtst-dev,
04/03/2020 08:50:08   or other packages).
04/03/2020 08:50:08 No XTEST extension, switching to -xwarppointer mode for
04/03/2020 08:50:08   pointer motion input.
 

Will continue to dig deeper. 

Link to comment
Share on other sites

On 3/4/2020 at 2:27 PM, Legomaniac said:

Curious as to what tools you have left on your PC?

Afraid that Lely will sometime check up on this and block access, but I was strolling through some Lely files and found this in an install.bat: 

echo Installing...
plink -ssh -m install.sh -pw lely123 root@%IP%

echo Done
pause
 

Bingo. 🙂

Link to comment
Share on other sites

On 3/4/2020 at 2:57 PM, Legomaniac said:

So I have good news and bad news. I was able to login as root (Excellent news!) The bad news is, x11vnc that is installed on the robots doesn't seem compatible with input...

Will continue to dig deeper. 

Indeed, x11vnc won't start as root. I was able to make a new user in terminal, but wasn't able to start x11vnc being that user either. Right now I'm looking for config files for the x11vnc that starts with the robot. Should be able to add a -noviewonly command line somewhere. In the same way I want to add a password to the VNC server as well, because of the following.

Using the netsh command in W10 and portforwarding on the router I was able to link my Android smartphone directly to the robotscreen. So using the VNC viewer on my Phone I'm able to directly view the robot screen. Now adding the possibility to control the screen would make live alot easier.

Link to comment
Share on other sites

X11VNC WILL start as root. It seems the software now on the robot is different than on older versions. You don't need to create a "Lely" user. 

/usr is for user-installed programs. /usr/Lely is for user installed programs of Lely category, any user can access them. 

The problem/reason X11vnc won't start is because it isn't linking correctly to a library. 

In order to get x11vnc to start run

export DISPLAY=:0

cd /usr/Lely/vnc

LD_LIBRARY_PATH=/usr/Lely/vnc

Then it will start for you. But it will still be read-only, because XTEST is missing. 

I'm working on it. 

The script they use to launch vnc is /usr/Lely/VNC.start I got those commands from in there

Link to comment
Share on other sites

Didn't know about the users, thanks!

Found the VNC.start indeed, mine says

Quote

 

/usr/Lely # cat VNC.start
#!/bin/sh
#noxdamage in x11vnc because we don't use it, but gives warnings.
#nopw in x11vnc, because we don't use a pw.
mkdir -p /var/Lely/VNC
cd /var/Lely/VNC

while test 1; do
   echo "loop!"
   sleep 1
   echo "starting..."
   ipaddress=`/sbin/ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'`
   echo $ipaddress
   DISPLAY=:0 LD_LIBRARY_PATH=/usr/Lely/vnc x11vnc -httpdir /usr/Lely/vnc/classes -httpport 8080 -desktop $ipaddress -nopw -noxdamage -noviewonly -forever
done

 

I inserted the -noviewonly and -forever myself, didn't help. When I look at the running processes X11 actually runs with those parameters but it's still viewonly.

Link to comment
Share on other sites

Could it be an idea to use -xtrap?

From the x11vnc site: Use the DEC-XTRAP extension for keystroke and mouse input insertion. For use on legacy systems, e.g. X11R5, running an incomplete or missing XTEST extension. By default DEC-XTRAP will be used if XTEST server grab control is missing, use -xtrap to do the keystroke and mouse insertion via DEC-XTRAP as well.

 

Edit: tried -xtrap, didn't work.

Link to comment
Share on other sites

  • 3 weeks later...
On 3/6/2020 at 5:02 AM, Legomaniac said:

X11VNC WILL start as root. It seems the software now on the robot is different than on older versions. You don't need to create a "Lely" user. 

/usr is for user-installed programs. /usr/Lely is for user installed programs of Lely category, any user can access them. 

The problem/reason X11vnc won't start is because it isn't linking correctly to a library. 

In order to get x11vnc to start run

export DISPLAY=:0

cd /usr/Lely/vnc

LD_LIBRARY_PATH=/usr/Lely/vnc

Then it will start for you. But it will still be read-only, because XTEST is missing. 

I'm working on it. 

The script they use to launch vnc is /usr/Lely/VNC.start I got those commands from in there

Any news on this? Would it be possible to build and install an X11 VNC through terminal ourselves?

Link to comment
Share on other sites

  • 10 months later...
  • 3 months later...
  • 11 months later...

Hello,

a lely service engineer from the main office here, if you ask your lelycentre they can provide you with the special software to remotely controll the astronaut both for the a4 and the a5. please do not try to "hack" the software of the e-link/ astronaut. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...