security

Can you give an example of a buffer overflow?

I've heard so much about buffer overflows and believe I understand the problem but I still don't see an example of say char buffer[16]; //code that will over write that buffer and launch notepad.exe ...

VSTO + Security + deployment + SIMPLE?

I've created a simple VSTO excel code behind document that I want to deploy for a demo. I've started to look at all the documentation which seems to spiral forever and ever into more links. Can anyone advise on a quick, simple, straightforward tutorial on how to deploy a VSTO excel doc to an end user with full trust? ...

Password reset by emailing temporary passwords

A group in my company is implementing a single-sign-on REST API for our applications. This authentication service has a password reset function. The application sends the username to the reset function. If that username is associated with an email address, then an email is sent to that address with a temporary password. The other app...

What's the risk of deploying debug symbols (pdb file) in a production environment?

I have an application that logs exception strack traces and I wanted those stack traces to include file names and line numbers when deployed in production. I figured out how to deploy the debug symbols w/ the assembly, but in the process of researching the issue I ran accross this question, which implies that it's not a good idea to inc...

Secure a "thanks" page against non-logged in users

When a person registers on my site, or logs in, they are sent to "thanks.php". The page checks is you're logged in or not and if so, tells you what you can do and if not, gives you a link to the register.php page. However, anyone can make their own cookie and trick the script like that. How do I protect myself from this? One thing I ...

Stopping Session Sharing between malicious users in Rails

What's the best way to keep users from sharing session cookies in Rails? I think I have a good way to do it, but I'd like to run it by the stack overflow crowd to see if there's a simpler way first. Basically I'd like to detect if someone tries to share a paid membership with others. Users are already screened at the point of login fo...

Is there any way to have persistent (regardless of how small) client-side storage via the web?

Okay, since none of you guys like my question, let me rephrase it. User logs into an HTML form. With JavaScript, their password is hashed locally (salted too). The server knows what the password + salt should be, user is already registered, blahblahblah. Now the user requests a page. The server sends a random ID to the user. When t...

In VS2008, for FTP Publishing of a website, is there a way to save FTP Logon password?

I like the Visual Studio 2008 IDE integrated (not command line) feature to choose to publish an ASP.NET website to my webserver via FTP. I'm able to store my FTP username but I don't see any option to store my FTP password and so I must type it in each time I publish. Is there an equivalent to the "Remember password" functionality foun...

Why do you use a random number generator/extractor?

Hi, I am dealing with some computer security issues at the school at the moment and I am interested in general programming public preferences, customs, ideas etc. If you have to use a random number generator or extractor, which one do you choose? Why do you choose it? The mathematical properties, already implemented as a package or for w...

Change the "name" value of a signed Java applet

Hi, I've (self-)signed a java applet, so when a user views this applet in a browser, the browser will show a "digital signature cannot be verified" confirmation dialog. That's all ok, but: The value of the "Name:" property (seen above the "Publisher:" property) of this confirmation dialog is set to something I don't remember setting w...

Is it possible to enforce web service calls from known client only?

Scenario: A publically available Web Service that I have full control over. But I only want this specific desktop application (my published application) to have access to the Web Service. I could store a secret password in the desktop client, but that would be easy to crack. Is there any known implementation that enforces this? PKI, as...

how safe are PDO prepared statements

Started using PDO prepared statements not too long ago, and, as i understand, it does all the escaping/security for you. for example, assuming $_POST['title'] is a form field. $title = $_POST['title']; $query = "insert into blog(userID, title) values (?, ?)" $st = $sql->prepare($query); $st->bindParam(1, $_SESSION['user']['userID'], PD...

a few questions regarding php sessions

ive heard a few timse that sessions need to be cleaned with mysql_real_escape_string or htmlspecial chars because they can be modified. what im wondering is how are they modified because when i look at a websites session named PHPSESSID the value it contains is always encrypted. first of all what encryption method is it using and how is...

Which additional securities do you add to your open source cms installations?

I know that being open source does not necessarily makes a program more/less secure than closed source (let's assume this neutrality, to keep flames out of this post). Fact is: since the source code is open, everybody knows your defaults urls, default administrator logins, etc. I'm using Wordpress and Joomla in some projects of my clien...

What is the best mechanism to implement granular security (i.e. authorization) in an ASP.NET MVC application?

Suppose a high-speed developer was tasked with building a banking application which would be accessed by many different people. Each person would want to access his or her own account information but would not want others to access it. I would like to know the best practice for restricting access in an MVC application so that only the us...

how to manage security with user added external css (like myspace)

I've got a page which it has been requested I allow some user customization via CSS. I'm happy to do this, but am trying to figure out how to make it secure. There aren't many stylesheets that will be applied to the page, but I had originally thought that if I just checked that the page was a css extension that I would be safe. Howe...

PHP, RFI, and keeping things secure

I am working on a website which the good user inputs a website domain name, http://www.mysite.com. But I have been reading about remote file inclusion (RFI), and it is pretty interesting. Simply by adding ?page=http://www.mysite.com/index.php? or something near that I get some type of error (500). Other peoples sites using wordpress/ PH...

What's the fastest possible security configuration for netTcpBinding?

I'm running a WCF service that, among other things, is used as the back end for a web site. Because both the web site and the WCF service are running on the same machine, and in the interests of performance, I set it up with a netTcpBinding. Now the thing is, because they exist on the same box, I really don't care about either transpor...

How to view PHP on live site

Is it possible to view the PHP code of a live website ? ...

How does IBM's RDZ running on a PC access the mainframe's file system?

I hear repeatedly that while NFS-style files systems are available on IBM mainframes, they are often not enabled, presumably to minimize the security risks of the mainframe vis-a-vis the rest of the world. Given that I'd like to produce PC-based tools that reach out and process files on the mainframe, this makes a simple problem ("open ...