Computer security is security applied to computing devices such as computers and smartphones, as well as to both private and public computer networks, including the whole Internet.

learn more… | top users | synonyms

5
votes
1answer
84 views

Checking that a password contains a '$', a digit, and an uppercase letter

I have this code, which reads in a string password from the user and checks if it has a dollar sign $, a number, and an upper case letter. If it has all three, it ...
3
votes
0answers
40 views

Password & Shadow File Mockup

I tried to implement something similar to linux shadow.txt file and I am not aware of concepts such as memory fingerprinting. Could someone please review this code : ...
1
vote
1answer
49 views

Am I doing cookie authentication right?

So I have to write a little social network for a case study at university. I have done some simple webapps before but nothing that required authentication, login and so on. So I wrote this little ...
0
votes
1answer
71 views

Password Protect Page with PHP

I am using the following code to password protect pages on my site. This is how I am including it on a page: ...
11
votes
3answers
263 views

Constant-time string equality check

This is my attempt to answer my own equally named question on SO. In this case, I need a method comparing two strings so that the running time is input independent. ...
2
votes
1answer
81 views

Upload image with secure code

I have written [PHP code][ to upload image/s to server. (To see the result, open the JavaScript console of your browser, look at the Network tab or the Console tab.) The code is also available and ...
5
votes
2answers
206 views

Inserting a record into MySQL with a timestamp

I'm starting with PHP so I can save data to a MySQL database. I read a lot and it seems the "escape" strings is not so safe. This is my code: ...
5
votes
3answers
92 views

Command line password generator

I built a random password generator in Java which is meant to be run from the command line. It accepts options for: Length Upper case letters Lower case letters Special characters Numbers The ...
2
votes
1answer
944 views

Login system using a persistent cookie

I want to be sure that my code below properly secures the website based on all of the information provided. Login System Overview When a user logs in, the following user info is saved to a ...
5
votes
0answers
107 views

Secure way to store and load password in app config

I am trying to figure out a good way to store and load a password in the application configuration of my C# application. To achieve this I use the BouncyCastle library and the DPAPI from Windows. To ...
12
votes
1answer
125 views

.NET 4.5 licensing subsystem using RSA-4096 strong name key, SHA256 signed XML, and assembly signature enforcing

Abstract For the past week I have been looking at taking advantage of the .NET 4.5 improvements to code signing and XML signing to produce a licensing subsystem I can use to license my own products. ...
0
votes
1answer
57 views

AES 256 FIPS compliant encryption + HMACSHA256

I created an Encryption class that encrypts data and decrypts it using the AesCryptoServiceProvider class with an HMACSHA256 ...
7
votes
3answers
394 views

Storing hashed passwords

I'm a beginner and am self taught and was hoping I could get help from others more educated than me to show me what bad practices I might be forming before I go on further. P.S. This program is just ...
0
votes
1answer
55 views

JSON Writer (PHP)

I have written a simple PHP Script that takes $_POST input and uses it to add data to a .json file. Given the security flaws in ...
1
vote
1answer
67 views

Uri Routing PHP Code

I do programing with core php & i don't want to like use any cms or mvc framework. if any handy ideas then welcome it. index.php file ...
1
vote
1answer
35 views

Simple bcrypt Register User and User Login using PHP - is this approach acceptable?

I am learning PHP and have been looking into a suitable way to safely store password data in MySQL. Following advice from here (http://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-...
3
votes
0answers
51 views

Checkout process

I'm building a checkout process where I am quite frequently making SQL connections based on user input so this is quite important. I want to know if it's well-protected from any SQL injection or other ...
3
votes
1answer
80 views

Secure Token for use in API calls

My team has developed an API and I've been tasked with creating an authentication layer that allows partners' applications to consume it. To that end, I've created a data store which houses an ...
3
votes
1answer
53 views

Create share folder and AD security group and apply security to new folder

I think I'm finally done with my code and was hoping for some pointers. My goal for this script was to: Create new folder Create AD group FS-TESTSHARE-R Create AD group FS-TESTSHARE-RW Apply both ...
1
vote
2answers
54 views

Logging out users securely

Is there anything I need to add or is this the best security possible? ...
-1
votes
2answers
55 views

Primitive Twitch.tv IRC Chat Bot

So currently I have this basic little chat bot that can read commands and can timeout users if their message contains a banned word or phrase. I was wondering how I can improve on this bot to be able ...
6
votes
1answer
72 views

Batch script to make folders hidden

I just wrote a simple script cmd to hide private folders by combining several scripts from the Internet. Can anyone give me suggestions for improvement? This batch file uses a password hidden by ...
2
votes
0answers
36 views

Function to prevent sign-in form from being spammed

I have written a function that I want to protect from spam bots. I have used two techniques the first being filter after submit. After reading around I obtained the ...
2
votes
0answers
44 views

Signing timestamped API queries

The following code should prove to offer sufficient security for public API so my main concern is about design flaws in process. It is meant to describe the process and eventually get included in ...
1
vote
2answers
113 views

Encryption algorithm using CTR mode

I am using CTR mode (it is a cipher in itself) in this code. I just wanted to see what you thought about it before I finish it. (Yes, I know that the plaintext length and key length must be highly ...
2
votes
1answer
116 views

PHP Login script getting bypassed allowing access to my admin pages

I have a site where a friendly hacker says they have accessed my admin area. I am not able to see how this is possible so any help would be greatly appreciated. I am using PDO prepared statements to ...
5
votes
1answer
113 views

Generating XKCD passwords

Obviously, everyone should use a password manager to generate and store long unique random strings of characters for the vast majority of their passwords. However, one still needs to memorize a master ...
1
vote
2answers
67 views

Security concern for SQL Injections/XSS

This question is everywhere, and I looked at many answers. A lot suggest using mysql_real_escape_string but that isn't an option, since it's depreciated now. ...
4
votes
2answers
83 views

“Remember me” automatic login

I've implemented a "remember me" automatic login if no session has been set, but a remember me cookie is on their computer. I'm concerned about security and I'm not the best. I'm relatively new to OOP ...
2
votes
0answers
41 views

T-SQL Secure String Comparison

The previous version of my function was scalar-valued and employed a WHILE loop to do the comparison, this is SLOW. This new version is tabled-valued and uses a typical tally table in place of the ...
2
votes
2answers
340 views

AngularJS shopping cart using local storage

Two weeks ago I started writing some Javascript and AngularJS code for a customer. As a proud newby I must also be aware of the dangers on the big bad Internet. In particular vulnerabilities such as ...
4
votes
2answers
59 views

Better way for securing direct access to php files

I don't know if this method uses a lot of time to process, or if it is bad but I wanted to know if there is any better way of actually doing this? I have a few class files that I want to stop users ...
-1
votes
1answer
57 views

I'm not sure if my query is safe or I need an extra step to sanitize data

I'm not sure if my query needs extra steps to sanitize data to prevent SQL injection. If I use $wpdb->get_results($query), do I need to ...
0
votes
0answers
46 views

Adds digital signature to outgoing TCP packet

The code connects multiple clients to a server using TCP sockets asynchronously. I have added code to attach a digital signature to the outgoing messages from the server, to authenticate the message ...
2
votes
1answer
107 views

Creating a portable encrypted credential store

There have been a few questions over on SO recently about securely storing credentials in Powershell scripts. Because ConvertFrom-SecureString uses DPAPI it makes ...
3
votes
1answer
108 views

Encrypt and Decrypt

I just want to know if my code can be weak. Can anyone also spot a mistake in my code? Encrypt ...
5
votes
1answer
257 views

Encryption Algorithm in C#

I'm coding a "encryption" algorithm for learning and and don't know how good is it or how could I make it better: ...
-1
votes
1answer
78 views

Improving PHP Security of Login

One of my github issues is below. I am having some problems with my security, is there anything that I should or need to improve. Here is an example of code that I use, but throughout the script there ...
6
votes
1answer
584 views

BouncyCastle implementation with X509Certificate signing, KeyStore generation, and Socket creation

The following is a (somewhat messy) implementation of the BouncyCastle cryptography library. I create a self-signed certificate (hopefully correctly), store it in a Java KeyStore, and use it to create ...
-2
votes
1answer
63 views

Adding tables and values to a database

I am having problems with my code because I am using a system called styleci. Can you please check it? How can I make it better and more secure? ...
2
votes
2answers
83 views

Read and display data from MySQL table

Is there any security threat here? ...
7
votes
2answers
78 views

Simple command-line password generator

I'm very new to Haskell, I've read most of learnyouahaskell.com and played around with some simple things, but this is probably the most 'complicated' bit of Haskell I've written so far. I have an ...
2
votes
1answer
51 views

Validating user access to a function

I was reviewing the following code block and noticed there was validation check at the top. The 3rd line in the function checks if the invoice belongs to the logged in customer. I am wondering ...
3
votes
2answers
93 views

First user login function: Security and efficency opinions

I am writing an application for work. This application will sit on a closed network but I still have to be concerned about security. There will be a maximum of three types of user for this application:...
2
votes
0answers
55 views

XSS Sanitization of RSS Feeds using JS

I need to pull an rss feed with links, headlines, and descriptions onto the front page of a website, and while I would like to think the source is trustworthy, you can never rule out malicious actors. ...
3
votes
1answer
196 views

Function to generate a UUID

I am trying to prevent CSRF for my login page (linked from here), and for this I am going to use a random token generator to create a UUID for the session. The function that I have so far is as such: ...
2
votes
1answer
393 views

Secure RSA encryption with PyCrypto

I'm coding a very simple reverse shell in python, and I want to encrypt the communication between the server and the client. The idea is to exchange an AES key using RSA then use it to encrypt ...
8
votes
6answers
2k views

Custom algorithm for hashing and un-hashing password

I am attempting to create functions for getting an algorithm, hashing and un-hashing a string. As it stands, it works, and very well. But, I feel this is not secure enough and someone could easily ...
3
votes
1answer
105 views

Learning with an OOP CMS

I want to learn OOP and I am creating a little CMS for practice and to use it as a base for other projects in the future. This is the complete code: GitHub My major concerns are code structure, ...
1
vote
1answer
104 views

License Manager

I recently created a license manager for my publicly released project and I just wondered how I could improve it. ...