You can find standart cookie storage in your system( default browser).
PING use ICMP protocol, to receive cookie you should use HTTP/HTTPS protocol, I think so.
In my opinion system that issue logon tickets must have some web config tool/connection program, and you should use it.
I didn't work with sap gateway, so ...it's just my thoughts.