Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 23rd Apr 2013, 09:41 AM   #1
Warrior Member
War Room Member
 
Join Date: 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Arrow
Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

I had a "free" site delivered by BrainHost.com as part of signing up for hosting with them. No documentation was provided on the "free" site but it had a "BrainHost Website Configuration" plugin. This plugin controlled ad configuration but I also found the following code. Unless I am missing something BrainHost is capturing WordPress logins and passwords.

Anyone willing to confirm that this is in fact what the following snippets do? I find this extremely unethical and totally unacceptable from a hosting company. Do you agree?

Code:
#############################################
add_action('wp_login', 'bh_track_successful_login');
function bh_track_successful_login($user_login, $user)
{

    $params = array(
        'domain'     => $_SERVER['HTTP_HOST'],
        'user_login' => $user_login,
        'user'       => $user
    );

    $resp = _curl_post('http://setup.brainhost.com/track_login', $params);

    return;

}
function _curl_post($url=false,$post=array())
{
    // error handling
    if ( ! $url)
        return;

    // generate query string from post_data
    $query_string = http_build_query($post);
    
    // initialize curl
    $ch = curl_init();
    
    // set parameters
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    // run cUrl
    $response = curl_exec ($ch);

    // return the response
    return $response;
}
Attached Files
File Type: pdf BrainHostPlugin_Code.pdf (73.1 KB, 3 views)
pianoman959 is offline  
Unread 23rd Apr 2013, 09:53 AM   #2
ɹoıɹɹɐʍ ǝʌıʇɔɐɹǝdʎɥ
War Room Member
 
RobinInTexas's Avatar
 
Join Date: 2008
Location: Texas
Posts: 2,138
Thanks: 243
Thanked 453 Times in 382 Posts
Blog Entries: 3
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

Was that a free site provided by a third party as an upsell from another purchase?

It appears to report the post data back to brainhost, but what is the purpose of the configuration plugin?

Robin


...Even if you're on the right track, you'll get run over if you just set there.
RobinInTexas is offline  
Unread 23rd Apr 2013, 10:16 AM   #3
Warrior Member
War Room Member
 
Join Date: 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

The plugin was provided by BrainHost via My Creative Site Designs (which is now part of BrainHost). The website development and completion notices all came through BrainHost.com addresses. The plugin does serve another purpose in that it creates a configuration page where one enters HTML for up to 3 ads. This ties into widgets and themes enabled to display those ads. It does make ad management easier.

My concern is that they are capturing sensitive information without any notice to clients and that the capture code has nothing to do with the features of the plugin from what I can tell.
pianoman959 is offline  
Unread 23rd Apr 2013, 10:41 AM   #4
Web Developer
War Room Member
 
Andrew H's Avatar
 
Join Date: 2012
Location: Vancouver, BC
Posts: 593
Thanks: 149
Thanked 162 Times in 133 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

1. Why the hell are you using some random host like 'brainhost'
2. Why don't you contact their support and ask about this?

"You shouldn't come here and set yourself up as the resident wizard of oz."
Andrew H is offline  
Unread 23rd Apr 2013, 11:15 AM   #5
ɹoıɹɹɐʍ ǝʌıʇɔɐɹǝdʎɥ
War Room Member
 
RobinInTexas's Avatar
 
Join Date: 2008
Location: Texas
Posts: 2,138
Thanks: 243
Thanked 453 Times in 382 Posts
Blog Entries: 3
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

How much are they charging you for hosting and domain registration?

This sounds like a way overpriced upsell from a get rich quick promotion I passed up.

Robin


...Even if you're on the right track, you'll get run over if you just set there.
RobinInTexas is offline  
Unread 23rd Apr 2013, 07:12 PM   #6
Warrior Member
War Room Member
 
Join Date: 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

I have another hosting company. I only tried out BrainHost because of a super affiliate's recommendation and the "free" web site. I did ask support "how" they got my password twice and got no response. I have cancelled my account and it appears I will get a full refund based upon e-mails.

This post is really a warning to others who might consider BrainHost based upon their incentives.
pianoman959 is offline  
Unread 23rd Apr 2013, 07:14 PM   #7
Warrior Member
War Room Member
 
Join Date: 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

The hosting was recommended on one of the larger affiliate membership sites, not a get quick rich promotion. I have opened tickets identifying a problem on the membership site.
pianoman959 is offline  
Unread 23rd Apr 2013, 07:15 PM   #8
Active Warrior
Registered Member
 
Join Date: 2013
Posts: 33
Thanks: 0
Thanked 5 Times in 5 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

I found that they capture only login name

not password
neversay is offline  
Unread 23rd Apr 2013, 07:19 PM   #9
HyperActive Warrior
War Room Member
 
Scotty Bee's Avatar
 
Join Date: 2010
Location: Aussie Land Down Under
Posts: 136
Thanks: 49
Thanked 64 Times in 51 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

Why would Brainhost want login details unless they were up to no good.

Hostgator ask us for logins on their support desk even though they could probably access it on their servers but probly confirms your ID for security.

Sounds a bit sus to me
Scotty

Scotty Bee is offline  
Unread 23rd Apr 2013, 07:29 PM   #10
VIP Warrior
War Room Member
 
SteveJohnson's Avatar
 
Join Date: 2007
Location: Caldwell, Idaho, USA.
Posts: 1,967
Thanks: 1,024
Thanked 2,043 Times in 1,183 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

Unless I am missing something BrainHost is capturing WordPress logins and passwords.
You're missing quite a bit. The plain-text password that a user enters is never exposed to the core in a way that would allow its capture by an action or filter. They're only tracking successful logins. I say *only* because that's all they're doing - whether or not they SHOULD be doing it is a different question altogether.
SteveJohnson is offline  
Unread 23rd Apr 2013, 09:26 PM   #11
Social Apps Made Easy
War Room Member
 
FirstSocialApps's Avatar
 
Join Date: 2012
Location: Mooresville, NC
Posts: 913
Thanks: 231
Thanked 259 Times in 213 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

Why would you care if your host tracks your log ins. The database is on there server. If they wanted them they could just pull it from the server. Unless you run your own box your totally exposed to your hosting company.

FirstSocialApps is offline  
Unread 24th Apr 2013, 04:16 AM   #12
Warrior Member
War Room Member
 
Join Date: 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

Thanks Steve, WordPress documentation was a little misleading but I was able to confirm that only the login name was being captured. What set me up in arms initially was BrainHost providing me my admin password via an e-mail that did not come from WordPress. This was not the initial password but one to which I had changed. I thought maybe they grabbed it through this plugin.
pianoman959 is offline  
Unread 24th Apr 2013, 09:21 AM   #13
Social Apps Made Easy
War Room Member
 
FirstSocialApps's Avatar
 
Join Date: 2012
Location: Mooresville, NC
Posts: 913
Thanks: 231
Thanked 259 Times in 213 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

Originally Posted by pianoman959 View Post

e to which I had changed. I thought maybe they grabbed it through this plugin.
As I said they could grab your password and anything else from the database that is on there box. Why are you so upset? Or is this just a thread to bash a company?

FirstSocialApps is offline  
Unread 24th Apr 2013, 01:12 PM   #14
Warrior Member
War Room Member
 
Join Date: 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

FirstSocialApps, I spent over 30 years in IT. Yes admins can grab that information. The question is whether they should and the ethics associated with doing so. Improper access of passwords is grounds for termination by most companies. In addition, if the WordPress wp-config file encrypted passwords like the DB encrypts passwords it would be much more difficult for admins to grab the information. Yes I do change the permissions on the wp-config file to make it a little more difficult for admins to read that information.

Why do I get upset over admins accessing sensitive information without informing clients? A number of years ago I purchased a plugin that had a backdoor that allowed a criminal ring to setup a phishing site underneath one of my domains. I dealt with an incredible amount of paperwork with both banks and my hosting company at the time (both of which were very understanding). This makes me a little more sensitive to plugins that capture information and send it to another URL.

The fact is that information is being grabbed by BrainHost without notification that it is being done so. This information is being sent outside the hosted domain. This simply should never be done without full and adequate disclosure including justification of the need to do so.

I have current hosting accounts with HostGator, 1and1, RackSpace, with both shared and dedicated servers. I have no problem changing root or other passwords to give to them when asked and then changing them again when they are done with investigative processes. In my book, it is completely unacceptable for an admin to just go out and grab this information without client notification. Not only does this expose the client to risk, it exposes the hosting company to risk if a "bad" employee misuses the information. If a site is hijacked by criminal sources, there needs to be an audit trail and clear cut policies in place regarding access of sensitive information.

Regarding bashing, do I like BrainHost as a hosting company? Absolutely not, which is why I terminated my account but not for this alone. In my opinion should BrainHost be bashed for installing a plugin that captures and sends information outside a clients domain without informing the client? Definitely.

Do I take responsibility in that I didn't fully understand the WordPress documentation on the functions related to login information and was concerned that the password was being sent as well? Yes, but that is why I raised the question in the first place. I do code plugins but primarily code in other languages developing backends.

As a final comment, assume your payment processor information is stored on your server. Do you really want an admin being able to access that information? The issue comes down to one of trust and procedure. If you don't trust your hosting provider, it's time to leave. I have done so and will say no more.
pianoman959 is offline  
Unread 26th Apr 2013, 08:49 PM   #15
VIP Warrior
War Room Member
 
Karen Blundell's Avatar
 
Join Date: 2008
Posts: 1,768
Thanks: 4,644
Thanked 1,335 Times in 894 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

Originally Posted by SteveJohnson View Post

You're missing quite a bit. The plain-text password that a user enters is never exposed to the core in a way that would allow its capture by an action or filter. They're only tracking successful logins. I say *only* because that's all they're doing - whether or not they SHOULD be doing it is a different question altogether.
to add to this - and speculating why they would do this - perhaps it's to monitor the load that WordPress puts on a server when a user is logged into a WordPress back-end and performing tasks. WordPress uses a lot of CPU resources especially if one tends to use a lot of plugins -

I monitored WordPress resource usage for several months on one of my sites. I noticed at times the CPU usage would spike to 100% - and that was when I decided to look more closely at visitor logs and discovered I was under attack. Multiple brute force attempts on the wp-login.php file. I have since dumped WordPress for that site. WordPress is a great CMS - but it is subject to too many hacks because it is now used by too many unscrupulous people.

I am not surprised at all by any host monitoring WordPress usage - but that script would make me nervous too. I think that, at any time when you have concerns and you're a paying customer, you are well within your rights to question policies of the company you are dealing with, but just because you question, you shouldn't expect them to adhere to your wishes. You then have the option of taking your business elsewhere.
Karen Blundell is offline  
Unread 26th Apr 2013, 10:05 PM   #16
Warrior Member
 
Join Date: 2012
Posts: 4
Thanks: 0
Thanked 3 Times in 2 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

Originally Posted by Karen Blundell View Post

I noticed at times the CPU usage would spike to 100% - and that was when I decided to look more closely at visitor logs and discovered I was under attack. Multiple brute force attempts on the wp-login.php file.
So it's possible that BrainHost is maintaining a database of all the login names for the purpose of detecting a distributed attack across all the sites that it is hosting.

What if (hypothetically) it sees an attempt at using the same login name twice on two different sites, owned by two different clients? Coincidence? How many times would a specific login name be attempted on non-connected sites before it was certain that it was an attack? 3? 5? (I say twice on a reasonably long & unique login name.)

Also, comparing login names to a dictionary of commonly used passwords. How many times does the same IP need to attempt to use "dictionary" login names before the hosting service can reasonably conclude that it is a hack attempt and ban the IP? Again, I say twice. Same IP attempts to access two unrelated sites using the login name "poop1234" and if I ran the web hosting company, I'd issue an immediate ban on the IP.

It's probably much more complex than this, with sophisticated hackers doing a distributed attack against multiple sites using multiple IP Addresses, and a simple database of attempted login names may not by itself be of much value, but it would be one component. And another thing to consider is that database may be shared with other webhost providers in a cooperative effort to safeguard all of their sites by pooling their data, similar to how the anti-malware companies, and anti-spam entities do.
BFriendly is offline  
Unread 30th Apr 2013, 08:47 AM   #17
VIP Warrior
War Room Member
 
SteveJohnson's Avatar
 
Join Date: 2007
Location: Caldwell, Idaho, USA.
Posts: 1,967
Thanks: 1,024
Thanked 2,043 Times in 1,183 Posts
Default
Re: Please Confirm that this WordPress Code Captures Login Names and Passwords
Share on: 
fb share twitter share gplus share more share

Originally Posted by FirstSocialApps View Post

As I said they could grab your password and anything else from the database that is on there box. Why are you so upset? Or is this just a thread to bash a company?
No, they can't "grab your password". Passwords in WP are not stored as clear text. They could get the stored encrypted password, but why bother?
SteveJohnson is offline  
Closed Thread


Bookmarks

Tags
captures, code, confirm, wordpress


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 04:07 PM.