<kzav...@lenel.com> wrote in message
news:1108061223.2...@z14g2000cwz.googlegroups.com...
The assembly name of the client is automatically set by the .NET
Remoting framework in the IMessage Properties ("__TypeName" key).
Since these are both automatically set by the Remoting framework, I had
been wondering if there was some mechanism used by the framework to
ensure that they could not be spoofed. I figured that it was probably
possible to spoof them (and the old adage to never trust anything from
client still holds true), but had not been able to find anything
letting me know for sure.
So, just to make sure I've got it: neither of these should be trusted,
correct?
Thanks,
Bob Rozwod
The only situation in which the client might be considered trustworthy is
when communications between machines has been locked (e.g.: using IPSec to
allow the server to accepts calls from a given small set of machines), and
you have sole and absolute control of the client machines. This sort of
setup might be achievable for, say, a pool of servers working to service
middle tier application logic.
Of course, security of the application would still ride on the two original
assumptions (only the expected clients can connect, and nobody can run
"foreign" code via those clients). If you practice defense in depth, you
would probably still want act as if those clients can't be trusted since any
flaw in the systems supporting those assumptions would otherwise expose your
application to attack.
"roz" <r...@lenel.com> wrote in message
news:1108075979.1...@l41g2000cwc.googlegroups.com...
Yes. If you look at the framework code
(System.Runtime.Remoting.Channels.Http.HttpServerSocketHandler.ReadHeaders()),
the __IPAddress key is actually set on the server side based on the
socket's client IP address. This address can be spoofed. In fact, in
the case where the client is behind NAT or is going through a proxy
server, you won't even have the client's real IP address in there
anyways.
>From a security perspective, if someone has knowledge of valid
credentials to the system, the only way to prevent them from using it
is to deny them access to machines that can communicate with your
service (e.g. firewalls, OS/network security). And this is likely
outside the scope of any single application.