Deploy MySQL Database Encryption Using PHP and OpenSSL To Protect Customers Credit Card Info
Deploy MySQL Database Encryption Using PHP and OpenSSL To Protect Customers Credit Card Info
DELIVERING MYSQL SECURITY WITH PHP AND OPENSSL ERROR! BOOKMARK NOT DEFINED.
END-MOD.11 43
2
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
Abstract
In this module we present the techniques that are useful in securing the data against tamper in between
communicating parties by the man in the middle. This involves the use and implementation of message
digest (or hashing), message authentication and digital signature schemes. A hash function can provide
message authentication in a most satisfying manner when combined with digital signature algorithm,
which does have a key. Digital signatures currently provide Internet applications with data authentication
and non-repudiation services and is set to continue playing an important role in future as Internet services
continues to grow. Typical digital signature schemes, however, have some performance overhead, which,
while acceptable for the periodic setup of communication sessions, is often too large on a message-by-
message basis. Thus, the need today is to focus on the message authentication based on shared secrete-
key, which is ideally integrated into the hash function in some manner, and that’s the subject of this work.
Today if you’re a CIO keeping watch on a large enterprise organization you may be forgiven for feeling
overwhelmed by all the challenges involved in managing governance, risk, and compliance (GRC)
initiatives – however, you’re not alone – you’ve got lots of company. Many IT managers and executives
are under continuous pressure to create a comprehensive, enterprise-wide strategy dealing with security
and regulatory issues. These days, threat comes from all directions, from untrained employees and angry
ex-employees to clever hackers and cyber-criminals in various locations around the globe. Add to that the
ever growing government regulations, ever changing compliance and partners requirements – and the risk
of facing government investigation – and technology and business managers face scary and intimidating
situation.
3
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
Network Defenses
Today a lot more bold attacks by had core cyber-criminals
out of former Eastern Europe and the former Soviet Union Host Defenses
now Russia with heavy gear malware and identity theft. As
attacks on enterprise grow more sophisticated and diverse; Application Defenses
companies need to rethink their network defense and entire
enterprise risk management strategies. Security for that Data & Resources
matter is not only about protecting the network, but also
the data. That requires a combination of tactics, from Data Encryption
securing the network perimeter to encrypting data on
mobile and storage devices at rest. Today, many Fig. 1: The SerengetiSys Labs Defense-In-
enterprises look at network as taking a layered approach, Depth layered security model.
as per the SerengetiSys Labs’ Defense-In-Depth layered
security model, see Fig. 1. The PKI Infrastructure will give you the ability secure your network via data
encryption to preserve confidentiality, data hashing to maintain data integrity, and digital signature for
authentication and digital certificate to secure your e-commerce network systems through secure data
transfer over the public network, the Internet. The SIEM tools would give us the power of network
monitoring and threat events management and reporting.
Let’s look at what some of network structure entails and the security role they play:
• Perimeter Defenses Layer
An organization’s perimeter defense is the oldest and, some would say, the most cluttered security
layer. Firewalls have kept watch for over two decades at the frontier where corporate networks reach
the public network, the Internet. A firewall blocks questionable network packet from reaching internal
networks, denying passage based on the IP address of the packet’s source or destination service – such
as File Transfer Protocol (FTP) – the packet is attempting to reach. Intrusion detection systems (IDS)
followed firewalls into the fray, detecting malicious worms and other attacks that would get past a
firewall. Intrusion prevention systems both detect and block attacks. Also on the network boarder:
secure messaging gateways designed to prevent spam and e-mail-borne viruses. As time went, attacks
became bolder, and therefore, more defense power was required. In came the UTM appliance. A UTM
(Unified Threat Management) consolidated multiple devices into single systems combing hardware
software. The device combines the firewall typical of perimeter defenses with intrusion prevention
systems, anti-spam and antivirus software, and Web filtering. And its time also came to pass, and was
replaced with the network defenses which also interlinks with other layer.
house information on user identity and access management products may also enforce role-based
policies that permit or restrict access to specific networks, applications and data based on an
employee’s job specification.
Some IT departments aim to make the access task easier, via single sign on (SSO), for users who may
need multiple passwords to sign on to different applications. For example, in some large corporation it
is not uncommon for a typical employee to use between six and 12 applications every day mapping to
equivalent number of passwords. While at some departments like sales – the sale’s personnel might
end-up dealing with up to 10-20 computer systems. However, a successful implementation of SSO
requires good PKI infrastructure in place with centralized key management.
For best practices, however, it is good idea to implement system integrated solutions based on e.g.,
Microsoft Active Directory and Windows Identity Management Server The ability to provide
network-level authorization solution, meanwhile, would help say hospitals to maintain compliance
with the Health Insurance Portability and Accountability Act’s (HIPAA) patient data security
requirements; SOX Acts compliance, PIPEDA and etc.
• Network Access Control (NAC) Layer
Network access controls (NAC) – operate similarly to identity management application: They aim to
let trusted parties into the network and keep the bad guys out. In the case of the network access
control, however, the parties involved are machines (devices) rather than people (users). NAC
products check devices connecting to the network for vulnerabilities, admits those that pass muster
and quarantine offending machines for remediation. It is important to note that end-point scanning is a
key driver for secure NAC deployment. NAC vendors refer to this feature as pre-admission control.
But the technology is also important for keeping tabs on devices once they enter the network, a task
vendors describe as post-admission control.
Having a centralized integrated network infrastructure that includes properly configured identity
management is critical before launching a NAC deployment. This is particularly true regarding post-
admission controls, which comes into play after admission, is granted and role-based access is
reviewed. Getting a grip on identity is crucial, and very useful especially for granular understanding of
user’s identity – which drives access controls.
In this respect, monitoring and reporting are important features for any network device, but for any
security boxes tasked with blocking or allowing traffic, the ability to quickly drill down to a particular
user or computer and see its status is critical for troubleshooting. As such you need in place, excellent
network defense appliance with good monitoring features, high-level information, and ability to
access the detailed view quickly.
5
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
Fixing and securing the network is fine – but how do you protect the stored data at rest or those on mobile
device like laptops which are highly vulnerable stolen leading to heavy loss of data – at times with
thousands customers/employees personal information. Encrypting networks and data is a necessary
fallback. However, encryption isn’t magic bullet nor isn’t invulnerable – criminal will always attempt to
crack it – just as they do antivirus and anti-malware programs. And encryption doesn't do a darn thing
against many SQL injection attacks or abuse by authorized users with access to keys. Still, encrypting data
is the best last resort when lost or stolen data falls into malevolent hands, it’s a technical solution IT
departments and vendors can afford to ignore – and it is easily implementable once encryption policy is
put in place. About three-quarters of IT organizations budgeted for encryption in 2007, that percentage is
likely to rise – i.e., more company data will be encrypted, in 2008 and beyond.
To add to IT security complexity and woes – Federal regulations and partners requirements are constantly
changing, and therefore, continuously forcing many organizations in Healthcare, Finance, City
Government or any publicly-traded company to comply with the regulations and business partners’
requirements, i.e.,: Who has the access to your network? How do you keep the bad guys out and let the
good guys in? How do you control your supply chain and grant access to independent contractors and still
comply with rules? And what happens to that laptop with company confidential information when it goes
missing?
Moreover, with constant changing government laws & compliance requirements and business partners’
regulations company must fulfill are continuously a moving target scenario, see Fig. 2. Some of the
regulations and requirements that are currently in effect are: Health Insurance Portability & Accountability
Act (HIPAA); Gram-Leach-Bliley Act (GLBA), Sarbanes-Oxley (SOX) Act; Payment Card Industry
(PCI) Data Security Standard; and PIPEDA in Canada. Not meeting regulations can become a very big
risk and can result in big problems for a company and especially its executive board.
Furthermore, today as we are constantly confronted with the ever dreaded identity theft epidemic; adding
to already endless pressures to IT tribulations. It is expected that government regulations, partners’
requirements and public outrage will eventually force a clampdown on sloppy physical and digital security
practices. Today, the problem of identity theft – the loss of millions of individuals’ personal data around
the world – is on the rise and is expected to get worse. That means huge losses for consumers and
organizations, and tighter privacy regulations. IT organizations, however, don’t expect technical solutions
will end the security breaches any time soon; most say damage from viruses and computer worms will
continue to rise significantly over the next five years. Inadequate mobile security is emerging as a new
nightmare. But the biggest threat to security and identity is careless behavior: More IT executives say lost
or stolen laptops or computer media represent a significant security threat to their organization’s IT assets
6
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
than attacks on corporate networks; infected e-mails, downloads or web sites, or vulnerabilities in
software or anti-virus programs. Changing IT executives’ behavior continues to be notoriously difficulty,
but organizations will need it to conform to business requirements.
REQUIREMENTS
Encryption Anti-Virus
TECHNOLOGY
Business
Driver Vulnerability Authentication
PROCESSES
Identity Management Physical Security
HIPAA
COMPLIANCE
MANAGEMENT IT Operations Application Dev.
SYSTEM
PIPEDA
Security Operations Documentation
FFIEC
Employees Contractors
FISMA
Moreover, as amount of businesses transacted across the Net increases, a corresponding rise in the amount
of personal information being stored on devices connected to it is being seen. With some of the woefully
uses of such data carried out by some retailers and vendors who have proven they simply don’t “get” what
effective privacy and security policies constitute, salivating cyber-criminals are often able to get their
hands on such data as easily as picking cherries off a tree. Take, for example, for the better part of 2007,
retail giant TJX was raked over the coals for allowing hackers to penetrate its network over a three-year
period and pilfer more than 94 million credit card records – the worst security breach in the history of the
Internet to date. The record-breaking breach suffered by TJX Companies didn’t just happen – it was the
result of conscious choices made by the retailer’s IT executives to risk not adopting security best practices
(e.g., TJX IT department willfully ignored not upgrading from the obsolete WEP encryption to the more
secure WPA encryption), and regulator’s decisions to treat the retailer with kid gloves.
In the end, with authorities virtually powerless to stop much of the online cyber-criminal activity today
taking place, the best defense for companies is to employ stringent guidelines around generation,
exchange and storage of data. It is also imperative that employees be educated on the importance of such
policies, and the dangers of not following them, follow clearly written guidelines on risk management plan
– that closely monitors the security of the network and data encryption policies.
7
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
And today, with the pervasive adoption of wireless networking, organizations are facing greater risks from
a wide variety of sources. Neighboring networks, hard-core-cybercriminals, rogue access points, personal
devices and misconfigured infrastructure are now exploit vectors from which corporate security can be
compromised. Current existing enterprise firewalls and VPN security systems do not provide effective
defense against these wireless threats. No longer is having a "No Wi-Fi" policy a guarantee that your
organization has mitigated the risk associated with wireless LANs. If you have a wireless LAN, the
security capabilities built into your wireless infrastructure may not provide enough protection.
There are two particular security challenges worth mentioning: the broadcast nature of wireless networks
and an initial weak encryption standard. Wireless networks transmit data to anyone in the broadcast area
that has the right equipment to tune-in reception. This is a unique difference from wired networks and
poses security challenges that can expose an organization to significant transaction and reputation risks.
Managing the broadcast area involves controlling radio transmissions that can travel through walls,
windows, and doors. In addition, the initial encryption standard to protect data transmissions, named
"Wired Equivalent Privacy" (WEP), has well-known weaknesses and vulnerabilities. Experts have cracked
the WEP security standard, and tools are available to exploit WEP vulnerabilities – and its not surprising
to find come companies still using the WEP option. As such network must implement the alternative
security – the WiFi Privacy Access (WPA). The combination of uncontrolled broadcast areas and use of a
weak encryption standard creates an environment in which unauthorized access to systems and
information can occur. This combination increases the importance of an effective security program and
the quality of risk management.
For home wireless network it is sufficient to implement 128-bit WEP key, however, for better security
always use WPA security. While for enterprise level network, the wireless security issues can be remedied
via implementing user policies and procedures. Implementing effective policies and procedures for
wireless network installations and their usage reinforces the importance of system security. Wireless
policies usually restrict employees from establishing their own wireless networks without prior approval,
since wireless access points are relatively easy to install. Unauthorized wireless networks may present
high and potentially large risks to the security and integrity of enterprise networks, especially financial
institutions or credit card handling sales points. In addition, effective policies and procedures should
encourage employees using approved wireless networks to report unusual activities.
In a network compromise scenario, the only must-have for a successful attack? Access. Any security
expert or penetration tester will tell you that once he gets in a network – subverting IT is just a matter of
time. To make matters worse, once someone gains access to the remote or private network and obtains a
valid IP address, the intruder could appear, at least from a network perspective, to be an authorized
corporate user. Unless you have network access controls or core firewalling with good SIEM tools in
8
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
place, the attacker may well gain access to all your local and WAN-connected corporate assets via branch-
office connections. This is one reason wireless is such a boon to attackers – network access is no longer
confined to the physical building in this era of on-demand anytime-everywhere-anywhere network access.
Moreover, with the advent of enterprise-class 802.11n systems, the remote WLAN equation becomes even
more complex with added known-unknown risks. The upside is that the 802.11n will greatly increase the
throughput rates of each AP radio while enhancing its ability to identify rogue devices. The downside –
beside the enormous cost premium that 11n gear commands – is that it will be even easier to saturate
available WAN bandwidth. Security methods such as wireless encryption keep private data private, but
the most critical measure is authenticating systems and users before granting access to the wireless LAN
(WLAN). The same holds for wired networks. While companies stressed over WEP’s weaknesses, they
were letting contractors, consultants, and other guests onto their networks with nary passing thought.
Fig. 2a: General policy processing for computers and users accessing Wi-Fi networks.
Enter in-bound network access control. Installed between access layer switches and distribution or cores
switches, in-band NAC creates a choke point in the network; only systems that pass muster can enter, see
9
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
Fig. 2a. This is more than binary decision of grant/deny access. In-band NAC appliances granularly
regulate access to network servers and services. That’s a powerful tool for mitigating the problems of
wide-open entry rights that plague authentication-only access control systems.
In the modern information-oriented society, various devices are connected to the Internet as terminals,
which necessitate technology for information security. Today, the world continues to witness an explosion
of technology designed to help people communicate faster and more easily. We carry powerful digital
computers in our pockets, exchange digital information in addition to voice data with our mobile phones,
and surf the Web with high-end PDAs. In the near future, especially the coming of age of 3G wireless
devices, every type of electronic data channel will be used to exchange every type of electronic
information. One of the great challenges of the ability to communicate digitally is securing the increased
amount of electronic information now exchanged over the network. To make the matter worse today,
everyone wants to be everywhere and anywhere and be reached via his tech-mobile system. And that
makes mobile security a top priority for many businesses that want to offer high-end mobile customer
application.
Over the last three decades the traditional cryptosystems like DES, AES, RSA, DSA, One-Time-Pad,
DLP, ElGamal and of late ECC, have thus far been the answer to the wide range of issues that impact
modern secure communication, mobile data protection, including the assurance of privacy, the certainty of
the transmitter or receiver’s identity, and the integrity of the communication. And of late centralized
enterprise key management is playing role a in HR provisioning via people, process and technology. And
of late the role key management is playing in enterprise mission-critical data encryption and network
access control.
signature, the main idea is no longer to disguise what a message says, but rather to prove that it originates
with a particular sender.
Role-based ID Management and separation of admin duties as depicted in Fig. 3 has great advantages in
securing enterprise network. Today, security and privacy issues are increasing considerably with each
passing day – and not to mention the crosswinds coming from stricter regulatory environments, as well as
an understanding that each new technological enablement introduces the potential both for increased risk
as well as enhanced security. This is where role-based ID management comes into play – as it can offer
organizations an umbrella approach to securing their entire network infrastructure.
11
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
Storage array
Storage tape
The full document has moved to Docstoc.com. You can access and download it from
here:
• Deploy MySQL Database Encryption using PHP and OpenSSL to Protect Customers Credit Card Info
OR
http://www.docstoc.com/docs/32581452/Deploy-MySQL-Database-Encryption-using-PHP-and-OpenSSL-
to-Protect-Customers-Credit-Card-Info
-----------------------------------------------
Kefa Rabah is the Founder of Global Technology Solutions Institute. Kefa is knowledgeable in several
fields of Science & Technology, Information Security Compliance and Project Management, and
Renewable Energy Systems. He is also the founder of Global Open Versity, a place to enhance your
educating and career goals using the latest innovations and technologies.
12
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada