iOS security sending data with password to and from server

user2038460

I'm building an app that needs to send the password from the user's device to be authenticated on the server before the server does any operations. it goes like this:

  1. User has a plain text password on their phone that is also in the server as a bcrypt binary.
  2. user wants to get something from the database, so user sends their ID & Password to the server via (currently plain text. its bad).

        NSString *url = [NSString stringWithFormat:@"%@f=getUserInfo&ID=%@&password=%@",[[Globals global] operationServerName], self.ID, self.password];
        NSData *data =[[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:url]];
    
  3. server hashes the password it got from the user and retrieves the already hashed password from the server and makes a comparison, if they match, it gets something from the database

The problem is that the ID and Password are sent to the server over plain text and i have no idea what to do or implement to make it secure such that it avoids eavesdropping attacks. i have absolutely no idea what to do but i heard ssl/tls would help, if anyone could on an elementary level explain to me how to fix the problem or point me in the right direction, i'd REALLY appreciate it! Any tips or explanations on how to improve this would be awesome! I'm totally clueless.

also server side wise, it'd be good to know what i should add there to make it possible in the app. I'm currently using a local server, but when it goes live, it'll be from a hosting company

GoodSp33d

You need to send data through HTTPS connections instead of HTTP. That way the data flow between the client and the server will be encrypted.

You need to install a SSL Certificate on your server.(If you are unaware of installing just ask your host provider to do it). Now instead of returning http link in your global method [[Globals global] operationServerName] return HTTPS (https://example.com)

This should take care of encrypting data flow between server and client.

Reference: http://www.tldp.org/HOWTO/SSL-Certificates-HOWTO/x64.html

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Sending data back from a Node server to an iOS device (Using Swift)

From Dev

Sending data from disk to server without loading into ram on iOS

From Dev

Sending data to Bluno from iOS

From Dev

Sending data from a server to a client

From Dev

Sending location coordinates to server in background from iOS

From Dev

JWT for sending iOS push messages from the server

From Dev

Sending Data to Server when NetConnection is Available from Device IOS7

From Dev

Sending data from a browser to a server and back

From Dev

sending data to particular client from twisted server

From Dev

sending data to particular client from twisted server

From Dev

Java Sockets - Sending data from client to server

From Dev

Sending data from android studio app to server

From Dev

Sending data from Flask to Java Server

From Dev

Issue with sending % in password by converting password in data using NSUTF8StringEncoding server not accepting

From Dev

Sending Data To Server While App is Running in Background in iOS 7

From Dev

Sending data after password validation

From Dev

Get data from server in iOS

From Dev

unable to fetch data as Post when Sending it as Post From IOS NSMutableURLRequest

From Dev

Sending data from a BLE enabled arduino to an iOS App

From Dev

How can I set a fixed custom password in Teamviewer (server) without sending registration data?

From Dev

Ubuntu server sending mail from www-data

From Dev

Sending secure data from .NET to Linux server using POST?

From Dev

Sending array of data to PHP at server from vb.Net

From Dev

Ubuntu server sending mail from www-data

From Dev

Sending image data (base64) from client to server

From Dev

Sending data from mobile client to java server every second

From Dev

Sending data from the Python TCP Socket(as server) to the JS client

From Dev

Ajax Successfully Receive Data From Server, But Failed Sending It

From Dev

Angular Controller Sending and Receiving Data to/from a Nodejs Server

Related Related

  1. 1

    Sending data back from a Node server to an iOS device (Using Swift)

  2. 2

    Sending data from disk to server without loading into ram on iOS

  3. 3

    Sending data to Bluno from iOS

  4. 4

    Sending data from a server to a client

  5. 5

    Sending location coordinates to server in background from iOS

  6. 6

    JWT for sending iOS push messages from the server

  7. 7

    Sending Data to Server when NetConnection is Available from Device IOS7

  8. 8

    Sending data from a browser to a server and back

  9. 9

    sending data to particular client from twisted server

  10. 10

    sending data to particular client from twisted server

  11. 11

    Java Sockets - Sending data from client to server

  12. 12

    Sending data from android studio app to server

  13. 13

    Sending data from Flask to Java Server

  14. 14

    Issue with sending % in password by converting password in data using NSUTF8StringEncoding server not accepting

  15. 15

    Sending Data To Server While App is Running in Background in iOS 7

  16. 16

    Sending data after password validation

  17. 17

    Get data from server in iOS

  18. 18

    unable to fetch data as Post when Sending it as Post From IOS NSMutableURLRequest

  19. 19

    Sending data from a BLE enabled arduino to an iOS App

  20. 20

    How can I set a fixed custom password in Teamviewer (server) without sending registration data?

  21. 21

    Ubuntu server sending mail from www-data

  22. 22

    Sending secure data from .NET to Linux server using POST?

  23. 23

    Sending array of data to PHP at server from vb.Net

  24. 24

    Ubuntu server sending mail from www-data

  25. 25

    Sending image data (base64) from client to server

  26. 26

    Sending data from mobile client to java server every second

  27. 27

    Sending data from the Python TCP Socket(as server) to the JS client

  28. 28

    Ajax Successfully Receive Data From Server, But Failed Sending It

  29. 29

    Angular Controller Sending and Receiving Data to/from a Nodejs Server

HotTag

Archive