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

1
vote
0answers
15 views

Api with security through a private and public key

I want to make users login into an app, the code on my server serves a "token". This is based on a salt that is saved for each user, the login date, expDate and the userId. That value is hashed by the ...
-1
votes
0answers
27 views

MySQL security in node.js client/server [closed]

This is a little project I've been working on for a while, as I learn javascript, I believe I've got it to a good first version, but would like an opinion from someone who knows javascript more. ...
-1
votes
0answers
25 views

Random password generator for my iOS app using Objective-C [closed]

I am trying to make a random password generator for my ios app using Objective-C and I was wondering if i was doing it correctly. I want to run this in Xcode. ...
4
votes
3answers
76 views

Securing PHP using a gateway that consults a whitelist

My site was recently infected and running malicious scripts. Once I discovered this, I cleared everything, the hosting company re-initialized the VPS and I setup my site anew. This is how I run my PHP ...
3
votes
2answers
59 views

Create/Verify signed license files

The purpose of the class is to provide an easy way for create and verify a signed license file (or key). I am interested in any improvments / thoughts about the class. Usage: ...
1
vote
1answer
46 views

CSRF-prevention mechanism for a form

I am using codeigniter framework in PHP. In signup form I have: Controller: ...
3
votes
2answers
58 views

PHP Authentication Form

Drafted this up today out of the need for a very simple php based login form to protect an html page. The app is simply included the top of index.html like this: <...
4
votes
2answers
116 views

Password generator and hashing

To generate a password, I generate a key using RNGCryptoServiceProvider. The key is 9 alphanumeric characters long into which I insert a single non-alphanumeric character for a full length of 10 ...
2
votes
1answer
35 views

PHP upload script might be vulnerable

I have written a basic PHP upload script a few years ago and recently I discovered some phishing html pages in the website's root. This website is located in /www/sitename, while I upload the files ...
2
votes
1answer
67 views

Simple login page

Could anyone tell me if this code is well written and if it has bugs / vulnerabilities? class.user.php: ...
8
votes
2answers
127 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
44 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
53 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
84 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
4answers
291 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
82 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
212 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
94 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
954 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 ...
6
votes
0answers
142 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
147 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
89 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
396 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
57 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
68 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
40 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
1answer
65 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
88 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
56 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
65 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
77 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
39 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
129 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
133 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
116 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
70 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
89 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
454 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
62 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
58 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
48 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
118 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
115 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
289 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
816 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? ...