Database-driven sites are vulnerable to hackers, who can (and do) exploit
bugs in those programs to gain unauthorized access to your site. The following are some things you can do to help secure your site.
Set register_globals to OFF
1. Turn off Display Error/Warning Messages. Set error_display to ZERO
2. Never run unescaped queries
3. Validate all user inputs. Items on Forms, in URLs and so on
4. Move config.php and files containing Passwords to MySQL to a secure directory outside of the public_html folder
5. Change permissions on any configuration files containing private information such as database passwords or email accounts to 440 so they cannot be written to and so there is no world permissions. If you need to edit them at a later time you will need to change it back to 640
6. Access Control: You don't want the user to have access to any Admin function or Clean up scripts
7. The .htaccess file is your friend. Use it to deny access to your site or files. (We also have an easy IP Deny Manager tool in the cpanel)
8. PHP can parse any valid script, whether it is called foo.php, very_long_name.php.php.php, or even deleteme.bat
Using the default extension of ".php" means that before your hackers start you have already told them you are using PHP
As mentioned, you can use any filename for your scripts - if you are using PHP for every script on your server, consider using the ".html" extension for your scripts and making PHP parse HTML files You can change your file extension by adding this line to the .htaccess or turn it on via the Apache Handlers in the cPanel (AddHandler application/x-httpd-php5 .html)
To protect against SQL injection attacks Sometimes hackers will try to screw up your database by inserting SQL code into your form input fields. They can for example, insert code that could delete all the data in your database!
To protect against this, you need to use this PHP function:
mysql_real_escape_string()
This function escapes (makes safe) any special characters in a string (programmers call text a 'string') for MySQL.
9. Example: $name = $_REQUEST['name']; $safe_name = mysql_real_escape_string($name); Now you know the variable $safe_name, is safe to use with your SQL code.
10. Keep the PHP code to yourself. If anyone can see it they can expliot vulnerabilities.
You should take care to store your PHP files and the necessary passwords to access your MySQL databases in protected files or folders.
The easy way to do this is to put the database access passwords in a file with a .inc.php extension (such as config.inc.php), and then place this file in a directory which is above the server's document root (and thus not accessible to surfers of your site).
Then, refer to the file in your PHP code with a require_once command.
By doing things this way, your PHP code can read the included file easily but hackers will find it almost impossible to hack your site.
You can find more information about hardening your PHP scripts at: PHPsec.org
Also, for security purposes, you can refer to these two websites:
http://php-ids.org/
http://blogsecurity.net/
You can find more information about hardening your PHP scripts at:
http://phpsec.org/projects/guide/
Thursday, July 14, 2011
Monday, May 16, 2011
Childhood leukaemia linked to mosquito bites
BITES from mosquitoes carrying unidentified viruses might explain childhood leukaemia clusters around the town of Fallon in Nevada. And last week, a separate UK report found no link between nuclear power plants and childhood leukaemia.
The Nevada cluster is the largest in the US. Previous research failed to find a link between the cases and carcinogenic chemicals. The new study of the 14 Fallon cases that arose between 1997 and 2003 - a rate 12 times higher than normally expected in such a period - concludes that military personnel may have brought a virus to the area, which was then spread by mosquitoes. The cluster "fizzled out" once all vulnerable children had been infected.
"The rural location of most cases suggests mosquitoes as a possible vector," says study author Joe Wiemels of the University of California, San Francisco (Chemico-Biological Interactions, DOI: 10.1016/j.cbi.2011.02.019).
In the UK just 20 cases occurred within 5 kilometres of 13 nuclear power plants between 1969 and 2004 - six fewer cases than at seven "control" sites where nuclear plants were planned but never built. "We should be looking in other places for possible causes," says Alex Elliott of the Committee on Medical Aspects of Radiation in the Environment, which produced the report.
Courtesy: www.newscientist.com
The Nevada cluster is the largest in the US. Previous research failed to find a link between the cases and carcinogenic chemicals. The new study of the 14 Fallon cases that arose between 1997 and 2003 - a rate 12 times higher than normally expected in such a period - concludes that military personnel may have brought a virus to the area, which was then spread by mosquitoes. The cluster "fizzled out" once all vulnerable children had been infected.
"The rural location of most cases suggests mosquitoes as a possible vector," says study author Joe Wiemels of the University of California, San Francisco (Chemico-Biological Interactions, DOI: 10.1016/j.cbi.2011.02.019).
In the UK just 20 cases occurred within 5 kilometres of 13 nuclear power plants between 1969 and 2004 - six fewer cases than at seven "control" sites where nuclear plants were planned but never built. "We should be looking in other places for possible causes," says Alex Elliott of the Committee on Medical Aspects of Radiation in the Environment, which produced the report.
Courtesy: www.newscientist.com
Tiny Variation in One Gene May Have Led to Crucial Changes in Human Brain

Tiny Variation in One Gene May Have Led to Crucial Changes in Human Brain
The human brain has yet to explain the origin of one its defining features -- the deep fissures and convolutions that increase its surface area and allow for rational and abstract thoughts.
An international collaboration of scientists from the Yale School of Medicine and Turkey may have discovered humanity's beneficiary -- a tiny variation within a single gene that determines the formation of brain convolutions -- they report online May 15 in the journal Nature Genetics.
A genetic analysis of a Turkish patient whose brain lacks the characteristic convolutions in part of his cerebral cortex revealed that the deformity was caused by the deletion of two genetic letters from 3 billion in the human genetic alphabet. Similar variations of the same gene, called laminin gamma3 (LAMC3), were discovered in two other patients with similar abnormalities.
"The demonstration of the fundamental role of this gene in human brain development affords us a step closer to solve the mystery of the crown jewel of creation, the cerebral cortex," said Murat Gunel, senior author of the paper and the Nixdorff-German Professor of Neurosurgery, co-director of the Neurogenetics Program and professor of genetics and neurobiology at Yale.
The folding of the brain is seen only in mammals with larger brains, such as dolphins and apes, and is most pronounced in humans. These fissures expand the surface area of the cerebral cortex and allow for complex thought and reasoning without taking up more space in the skull. Such foldings aren't seen in mammals such as rodents or other animals. Despite the importance of these foldings, no one has been able to explain how the brain manages to create them. The LAMC3 gene -- involved in cell adhesion that plays a key role in embryonic development -- may be crucial to the process.
An analysis of the gene shows that it is expressed during the embryonic period that is vital to the formation of dendrites, which form synapses or connections between brain cells. "Although the same gene is present in lower organisms with smooth brains such as mice, somehow over time, it has evolved to gain novel functions that are fundamental for human occipital cortex formation and its mutation leads to the loss of surface convolutions, a hallmark of the human brain," Gunel said.
Tuesday, March 15, 2011
NOT TRUE: BBC News Flash Report: Japan government confirms radiation leak at Fukushima nuke plants

Since the news spread out about the possible meltdown of Japan's nuclear reactor in Fukushima due to the strong earthquake last Friday, there has been fictitious text/SMS messages circulating around the Philippines. The text message warns that the radiation from the problematic nuclear plant will reach the Philippines and other Asian countries today and everybody is advised to stay indoors for their safety especially when it rains. Here's one variation of that text message:
BBC FLASHNEWS: Japan government confirms radiation leak at Fukushima nuclear plants. Asia countries should take necessary precautions. If rain comes, remain indoors first 24hrs. Close doors & windows. Swab neclskin with betadine where thyroid area is, radiation hits thyroid first. Take extra precautions. Radiation may hit Phil at starting 4pm today. Pls send to your loved ones.
If you received a similar text message: DO NOT BELIEVE IT! DO NOT FORWARD IT! It's a false warning designed to spread unnecessary anxiety and confusion.
Here are the facts:
- Although there has been two explosions in the Fukushima nuclear plant and a possible meltdown might occur, there has been no radiation leak yet that can reach other countries. In fact, only those inside the 12 mile radius from the plant are susceptible to current partial radiation leakage.
See also the report from BBC:
Experts say a disaster on the scale of Chernobyl in the 1980s is highly unlikely because the reactors are built to a much higher standard and have much more rigorous safety measures.
Source: http://www.bbc.co.uk/news/world-asia-pacific-12729138
- The Philippine Nuclear Research Institute (PNRI) issued a statement saying that radiation levels in the Philippine environment are all normal.
Here's the actual copy of their statement:
The DOST-PNRI routinely undertakes daily radioactivity monitoring in the environment. Based on DOST-PNRI monitoring, there has been no increase in the levels of radioactivity since the time of the Fukushima event.
A plume trajectory study from the Fukushima site by the World Meteorological Organization based in Melbourne, Australia showed that the plume from the site of the incident will not pass the Philippine territory as of March 14, 2011.
Source: http://www.pnri.dost.gov.ph/index.php
DOST advised the public not to believe this hoax.
Subscribe to:
Posts (Atom)