security

How to check if a page is displaying a specific <img> tag.

What is the best way to determine if a page on a website is REALLY displaying a specific img tag like this <img src=http://domain.com/img.jpg&gt;? A simple string comparison is easy to fool using http comments <!-- -->. Even if the html tag exists it could be deleted with JavaScript. It could also be obscured by placing an image over...

Using directory traversal attack to execute commands

Is there a way to execute commands using directory traversal attacks? For instance, I access a server's etc/passwd file like this http://server.com/..%01/..%01/..%01//etc/passwd Is there a way to run a command instead? Like... http://server.com/..%01/..%01/..%01//ls ..... and get an output? EDIT: To be clear here, I've found the ...

Is there an security advantage of using ADAM for asp.net membership over aspnet_regsql?

Hi, I'm wondering if there are security (or otherwise) advantages of using an ADAM (Active Directory Application Mode) store for asp.net membership. I'm afraid that setting up the ADAM store is more difficult than the default aspnet_regsql scripts for a default membership database, but i will prefer the more secure solution. Wich of th...

Security of scala runtime

I'm developer of Robocode engine. We would like to make Robocode multilingual and Scala seems to be good match. We have Scala plugin prototype here. The problem: Because users are creative programmers, they may try to win battle different ways. As well robots are downloaded from online database where anyone could upload one. So gap in s...

MVVM/ViewModels and handling Authorization

Hey guys Just wondering how how people handle Authorization when using MVVM and/or View Models. If I wasn't using VM's I would be passing back the Model and it would have a property which I could check if a user can edit a given object/property but when using MVVM I am disconnecting myself from the business object... and thus doen't ...

Reviewing 3rd Party code for security issues

I've been asked to oversee reviewing some 3rd party code (Freeware C# Sharepoint webpart in this case) before its inclusion on a internal corporate network. The big concerns are malicious code hidden in the webpart that will steal data/send information back to the webpart creator/etc, with a secondary concern being it will cause perform...

ajax safety in javascript games

In my JavaScript game (made with jQuery) I have player position stored in a database. When character is moving, i just send request to specyfic URL, I.E. mysite.com/map/x1/y3 (where a character's position is x=1, y=3). That url send coordinates to the database and checks to see if any other players are near ours. If yes, it sends also...

Why not DriverManager.getConnection(String url, String user, char[] password)?

We know it's a good practice to prefer char[] over java.lang.String to store passwords. That's for the following two reasons (as I have read): char[] are mutable so we can clear the passwords after the usage. String literals goes to a pool that will not get garbage collected as other objects, hence might appear in memory dumps. But j...

Grails Acegi manual login

Is there a way to do that without using a POST request to "j_spring_security_check"? ...

applet unable to access file from network drive

one of the users who is using my signed applet is unable to upload the file (basically unable to access the drive) from his netwrok drive and few of the other users who are using my signed applet able to access and upload the files from network drive. can i know what could be the reasons behind ? Note : user who is not able access the f...

How do I use an rsa securId like device to secure a Joomla website?

I've got a joomla website (Community Builder with CBSubs) purchased through joomlapolis. The client wants to secure authentication with an rsa device. If someone could point me in the right direction, that'd be great. ...

How to ensure website security checks

Hi; How to safe gaurd a form against script injection attacks. This is one of the most used form of attacks in which attacker attempts to inject a JS script through form field. The validation for this case must check for special characters in the form fields. Look for suggestions, recommedations at internet/jquery etc for permissible ch...

What is the best way to secure a webservice?

Hi, As the title allready explains I want to secure my webservice. I've read that you can do this using an soap authentication header, but then the username en password are passed as plain text. I was wondering what I should do to secure my webservice? Examples would be great. I have an example of a company we work with that has 2 web...

Does having a space at the end constitute a valid password

Does having a space at the end constitute a valid password e.g "ABCD " or "ABCD12 " Would it be fine, if we trim the password input (i.e "ABCD" would be the effective string after trimming) prior to authentication ...

Why would I hard-code user permissions in my controller attributes?

I have seen example code that looks like this, which seems perfectly reasonable: [Authorize(Roles = "Admin, User")] public class SomeController : Controller But I have also seen several examples that look like this: [Authorize(Users = "Charles, Linus")] public class SomeController : Controller Why would I ever want to do this? ...

Sign data with MD5WithRSA from .Pem/.Pkcs8 keyfile in C#

Hi, I've got the following code sample in Java, and I need to re-enact it in C#: PKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(pkcs8PrivateKey); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); PrivateKey privKey = keyFactory.generatePrivate(privKeySpec); Signature sign = Signature.getInstance("MD5withRSA"); sign.init...

how to use setuid() from root to become user, with the possiblity of becoming root again later ?

Hello all, I'm trying to do the safe thing, and have a program that needs to runs as root to drop its privileges when it doesn't need them. This works well if I chmod my binary with the SUID bit, and make it belong to root, as now I have UID = some user, and EUID = root, so I can use seteuid(0) and seteuid(getuid()) to respectively rais...

How does incredimail import email accounts automatically?

I installed incredimail yesterday to experiment with something. To my surprise I found out that it was able to pull email accounts from windows live mail including my username and password!! How is it possible for incredimail to do it? More serious concern is what stops spyware/virus programs to do the same? Is this a big security conc...

asp.net mvc 1.0: How can you implement dynamic, role-based navigation?

Building an application, and there will be different levels of access. What is the recommended way to restrict the display of navigation elements to those appropriate to the current user? Are there any built-in helper for this? ...

Could this XSS protection with HttpOnly Cookies work?

I have done some research on HttpOnly cookies and the problem that exist with the possibility to use an XHR request in combination with the TRACE method to get the cookie value echoed back from the server. For a secure webapplication I currently have the following setup: Session cookie is sent at login with secure and httpOnly propert...