Security aspects concerning code written in the programming language PHP which is often used for web applications.

learn more… | top users | synonyms

0
votes
0answers
33 views

PHP/Ajax Data transmission security

I'm learning about web security mechanisms. I have developed the following system in PHP and JavaScript: assuming that I have a page named: messages.php which is a real-time chat system. first when ...
0
votes
1answer
28 views

API Key DDOS prevention method

Hi I just wanted some feedback on a DDOS preventing php script that I'm designing. It quite simple and I wanted some feedback on whether you guys think it would be effective. I'm currently using the ...
4
votes
2answers
108 views

Safety of using online proxy?

Lets say for example I have to use a public online proxy like https://www.zend2.com to load a php webpage controlled by me containing sensitive data over https. How would i make sure that the proxy ...
1
vote
1answer
52 views

Running an Open Server (contents are visible)

I'm considering the possibility of running an Open Server, as I would call it, that is, a server where as much of its contents are publicly visible as possible. I would like to give read access to ...
0
votes
0answers
19 views

CLI API that requires plaintext user details

I've been tasked with writing a module for my company to interface with an external api. This api has a syntax similar to ssh where I have to incorporate the user details as well as the host address ...
0
votes
1answer
21 views

Can JS templates for admin-only pages be public

In my page admins-only section is very responsive, so I have to use both server and client side templating. Obviously server side templates are stored outside of web-root and routing takes care of ...
2
votes
0answers
88 views

Encrypted code in hacked wordpress site

I have a customer who wants me to "restore" his Wordpress page. I looked a little bit deeper in the codes and found the following code a few times in different files: http://pastebin.com/nL4i6t8x ...
0
votes
0answers
33 views

Are there any known security issues in phpBB 3.0.12? (Current version.) [closed]

I plan to use the phpBB forums, and I tried to search for any security vulnerabilities it might have, but I did not really find any actual security issues documented. So Are there any known security ...
1
vote
1answer
74 views

How do web email clients store my passwords from other providers?

The situation comes down to this: When I enter in hotmail, it retrieves my messages connecting to other providers: they could only do so by using my email and password. Since I had signed in a ...
0
votes
3answers
107 views

PHP Object Injection Prevention - OWASP

So I was just reading up on the OWASP site about PHP Object Injection. According to their site, the suggested fix is to not use serialze and unserialize but to use json_* (json_encode and ...
1
vote
2answers
44 views

Is php DOMDocument::loadXML completely secure?

Our application is using loadXML extensively to recieve data(input) from the users. Other than the usual checks for SQL injections and XXS, are there any known risks in parsing the xml file using ...
2
votes
2answers
71 views

PHP shellcode inside /tmp. Is the server compromised?

I have a Debian 7 VPS that runs Nginx, PHP5-FPM and MariaDB. This server runs a couple of WordPress installations, phpMyAdmin and Roundcube Webmail. One is my personal blog running WP 3.9.1 and ...
0
votes
0answers
52 views

Where to save digital content and prevent sharing?

I've been inspired by the answer to the question here: Location to store an encryption key It gave me a lot to think about. My friend and I are building a website and we've encountered a problem in ...
0
votes
0answers
30 views

PHP can't connect to PostgreSQL with “permission denied” error with SELinux [migrated]

My PHP app can connect when I turn off SELinux, but not with it on. setenforce 0; curl -I http://domain.com; setenforce 1 Yields no errors in /var/log/httpd/error_log. However, if I have it on, I ...
2
votes
1answer
150 views

Is this a bot fishing for security vulnerabilities on my site?

I am running a webpage for my family with a feature to track users and guests. Since its all just family stuff no one ever visits this server, and I hardly see more than 2-3 of us logged on at the ...
0
votes
1answer
98 views

Authenticating user on Node.js chat server from PHP session data

I'm creating a Node.js chat application for a company. The problem I'm running into is authentication. Because I don't want to ask the user a second time for their username and password when logging ...
0
votes
0answers
2 views

how to create a SIP request with specific header fields values [migrated]

I'm an intern at a telecommunications operator and my task is to create an application that enables me to send sip (session initiation protocol) requests with the header fields values that i specify , ...
3
votes
3answers
613 views

Is this a secure way of storing passwords? [duplicate]

So a couple years ago when I was learning basic back-end web development, I found a tutorial for creating a basic log in system. I haven't done much modification to the code since, but I have the ...
0
votes
1answer
37 views

Hashing session tokens

Users of my application can choose to remain logged in after closing and reopening their browser. I've read on several places that I would need to treat the cookie token (that serves as an identifier ...
29
votes
3answers
1k views

Why do WordPress installations retrieve the crypto secrets remotely on installation?

It seems that WordPress retrieves all the crypto constants remotely (via HTTPS): // setup-config.php $secret_keys = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); Are there ...
0
votes
3answers
55 views

How secure is my method?

I want to select data from a MySql database on an iphone device. The method I seem is the easiest one is to connect to a php file with GET arguments and then return it as a string. Now I'm just ...
8
votes
3answers
1k views

Allowing users to input a safe subset of HTML

I recently posted this question on Code Review and it was recommended that I ask you guys about it. Basically, this will be used to allow users to generate formatted content. It gets put inside of ...
1
vote
1answer
77 views

System that manages real money

I am working on a project that incorporates real money into peoples accounts. Their accounts are stored in a MySQL database and inside it there is a column called "BALANCE". When the users send money ...
0
votes
0answers
98 views

cURL cert validation with curlopt_cainfo not working

I want to validate my SSL certificate each time I run API calls. I've been following this guide: http://artur.ejsmont.org/blog/content/how-to-properly-secure-remote-api-calls-from-php-application ...
0
votes
1answer
62 views

Is it possible to avoid PHP string validation with malformed UTF-8 string?

Some of the old PHP string functions for example explode() are working with UTF-8 strings, but they don't work properly on malformed UTF-8 strings. Is this a security issue? Is it possible to avoid ...
-1
votes
2answers
135 views

If md5 is only insecure because of its speed, why doesn't this workaround make it reasonably secure?

I'm going to preface this by saying I have absolutely no clue when it comes to cryptography, but I'm posting this question because I'm very interested and I have no doubt there are some smart people ...
1
vote
0answers
122 views

'Ghost' access to a php file on a web server

I'm developing a personal project and one part of the project is a php website, hosted at hostinger as a free plan, that allow clients to ping to it and stores the WAN IP and the NAT IP of them. ...
0
votes
0answers
94 views

Starting database security for web app that logs in with Facebook/Google JS SDKs

I have been making a web app that uses Facebook and Google JavaScript APIs to login (no email login) on the client side and currently it accesses a MySQL database directly using PHP and MySQLi, but I ...
0
votes
0answers
29 views

Directory names using extensions a security risk?

In our app (PHP, MySQL) we allow users to create templates which are stored in their own subdirectory (which is named by the template name). Someone suggested to use standard file name sanitization ...
1
vote
1answer
87 views

Path Truncation not working in PHP while exploiting LFI

From what I understand in PHP '/etc/passwd/' or '/etc/passwd/./././' should be treated just the same as '/etc/passwd' I am using PHP 5.4 and this does not seem to be true: php -r ...
1
vote
4answers
161 views

How to detect credit cards harvested from memory?

Had a chat recently with PCI compliance specialist and got to realize there is a way to steal raw data from Apache / Nginx memory e.g. credit cards. It's called "harvesting" and becomes pretty common. ...
0
votes
2answers
90 views

How secure would this method be considered for password storage

Ok I am currently storing the passwords in most secure way I could think of. With use of Encryption and Hash. The passwords are first generated by user as plain-text with minimum length of 6 ...
-1
votes
1answer
43 views

BigDump v0.35b vulnerability [closed]

I dont understand what the problem with BigDump v0.35b. This site says that it have problem. But i dont understand it. Problem here? if (!$error && isset($_REQUEST["uploadbutton"])) { if ...
-1
votes
2answers
59 views

LAMP Stack Tiers - why?

What are the vulnerabilities mitigated by a tiered LAMP stack? As I understand it, any breach would allow access to the database even if it was tiered. What's the benefit? Are we better to ...
3
votes
3answers
194 views

PHP IP check as security?

Would just like some input on a PHP script I'm writing. It's just a simple script that only myself should be able to access. I don't have a dynamic IP address, so this isn't an issue for me, but I'm ...
2
votes
2answers
151 views

How could attackers exploit $_SERVER['HTTP_REFERER']

I've been warned that PHP's $_SERVER['HTTP_REFERER'] is a common attack vector for websites. What are ways that attackers exploit this function? How can I guard against them?
7
votes
3answers
703 views

What would the potential abuses be for an HTTP API that accepted raw SQL?

I was wondering what some of the potential abuses could be for an HTTP API that accepted SQL queries and output results sets. The fact that this is the canonical definition of SQL injection is not ...
1
vote
3answers
99 views

Is this a secure function for checking if a user has not stolen a session cookie?

As an exercise for class, I'm creating a class that manages user sessions. The session details are stored in a database and also there is a $_SESSION[user_id] variable to carry in between pages. The ...
0
votes
0answers
23 views

trackback spotted in multple http errors

[Sun May 11 12:24:46 2014] [error] [client private ip] [X_FORWARDED_FOR 27.159.207.165] Path not found: /contact_us_public.php/trackback/, referer: http://www.mydomain.net/contact_us_public.php Does ...
12
votes
5answers
1k views

Is there a way to check the filetype of a file uploaded using PHP?

I don't want it to just check the extension of the file as these can easily be forged even MIME types can be forged using tools like TamperData. So is there a better way to check file types in PHP ? ...
1
vote
1answer
92 views

Is it possible to add backdoor to a file with the same size and crc32 checksum (4bytes)?

Is it possible to add backdoor to a file with the same size and crc32 checksum (4bytes)? (The file does not contain byte code, it contains program code as text. The language is PHP.)
0
votes
2answers
117 views

Is there any issue using the PHP crypt() function with an additional salt?

Is my PHP authentication script secure? I noticed that the hashes start with the first two letters of the username. Could there be a security flaw using crypt() in such a way? <?php // ...
0
votes
2answers
113 views

Are PHAR archives secure?

I want to send the new releases of my application in encrypted, signed archives to the server. Are PHAR archives a good solution to do that? Is PHAR secure enough?
7
votes
2answers
155 views

Are my session settings secure enough?

I'm developing a file hosting and sharing web application. Are the following PHP session settings secure enough? ini_set('session.cookie_httponly', 1); ini_set('session.cookie_lifetime', 0); ...
0
votes
1answer
64 views

Email Spoofing Modified Headers

I have be reading more and more about email spoofing and was curious how some things are done. I know in PHP you can simply do mail() and then include "From: spoofsender@provider.com" for example, ...
0
votes
1answer
158 views

Php Session ID, http VS https [duplicate]

So I was doing some tests with the php session ID cookie. I know that data is stored on the server however, a cookie with a unique ID is stored so that the server can recognize the client while ...
6
votes
1answer
136 views

How important is a mysql password for localhost?

We can assume that if an attacker gained access to a web server running mysql that they would be capable of reading the scripts to determine the mysql password. If mysql only responds on localhost, ...
10
votes
3answers
380 views

How to deobfuscate this PHP malware?

Two days ago a file called "images.php" appeared on a friend's server, which he noticed because it caused errors. The file contained the following. This code is of unknown origin and presumed to be ...
0
votes
1answer
67 views

Dangers of PHP uploading word docs into a quarantine

I plan to write a PHP script which will allow web users to upload MS Word formatted docs. Here are the precautions I am taking: Filenames will be created by me (something like YYYY-MM-DD.doc) Files ...
5
votes
3answers
978 views

How to access directories disallowed in robots.txt?

While scanning my website with uniscan it found my robots.txt file which disallows access to /cgi-bin/ and other directories, but they are not accessible in browser. Is there a way to access the ...