Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,360 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,686 people online right now. Registration is fast and FREE... Join Now!




Developing Database desktop applications

 
Reply to this topicStart new topic

Developing Database desktop applications

pe_mitev
19 Aug, 2008 - 02:10 AM
Post #1

D.I.C Head
Group Icon

Joined: 28 Dec, 2007
Posts: 71


Dream Kudos: 50
My Contributions
Hello friends!
I am developing a desktop-based application, using a database connection(MySQL). I am developing it in .NET, but I put the question here, because in my opinion this question regards to all kinds of programming languages. The problem is that there is a small chance to need to connect to remote MySQL server, because of the needs of the application. I am storing some data in hidden objects at start-up.

My question is: If a cracker disassemblies my application and changes some things(for example create a query that extracts everything of DB), can he obtain the whole database structure and the data related to each table? And after he has succeed in his mission, can he drop everything?

I summarize - I will not just use localhost connections, remote connections should be used sometimes. I have all the types of queries inside the program and because of this can a hacker modify some of them or add his own.

P.S I forgot to say that I am encrypting the database password, but this is no security if the hacker uses my application as a executer of the queries.


I hope you have understood my question. I am looking for possible solutions of this problem as well as comments and opinions of others that have encountered this problem.

Best regards,
Penko Mitev
Bulgaria/(Italy until the end of August smile.gif)
User is offlineProfile CardPM
+Quote Post

mocker
RE: Developing Database Desktop Applications
19 Aug, 2008 - 08:32 AM
Post #2

D.I.C Regular
Group Icon

Joined: 14 Oct, 2007
Posts: 258



Thanked: 15 times
Dream Kudos: 25
My Contributions
.NET applications are fairly easy to disassemble, so hiding connection details in your application is not any security . Any mysql user your application connects as should have very limited database permissions. Ideally I'd suggest making a separate program that runs on the mysql server or another server and acts as an API. Your desktop app sends requests to the server api, which then does any necessary mysql queries and returns whatever data the app is allowed to have and has requested. A simple SOAP server could handle it. If you do keep remote mysql details in your app, you'll need to work with the assumption that those connections are now public and all the data that mysql user has access to is public as well
User is online!Profile CardPM
+Quote Post

pe_mitev
RE: Developing Database Desktop Applications
20 Aug, 2008 - 07:22 AM
Post #3

D.I.C Head
Group Icon

Joined: 28 Dec, 2007
Posts: 71


Dream Kudos: 50
My Contributions
How I am supposed to realize this server api? Should it be done with sockets or what? And actually, how can I secure this thing as he is able to disassemble my exe and use any of my integrated functions, change the query in one, execute it and save the data into a simple txt file?
User is offlineProfile CardPM
+Quote Post

baavgai
RE: Developing Database Desktop Applications
20 Aug, 2008 - 08:40 AM
Post #4

Dreaming Coder
Group Icon

Joined: 16 Oct, 2007
Posts: 2,022



Thanked: 105 times
Dream Kudos: 475
Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua

My Contributions
QUOTE(pe_mitev @ 20 Aug, 2008 - 11:22 AM) *

How I am supposed to realize this server api? Should it be done with sockets or what?


Web service.

Write your client program and keep all the methods for data access in a single object, allowing nowhere else in the program to open or use a database connection, only those methods. When you have something working, take that class and create a web service out of it. Now the client just talks to the web service.

Keeping all data access and manipulation in a single manager object is a good practice, regardless of how you implement your program. For organization, you can make such a class the public element of a library and implement your data layer naturally within that. However, your UI shouldn't really have to worry about the business of the storage layer.

User is online!Profile CardPM
+Quote Post

pe_mitev
RE: Developing Database Desktop Applications
20 Aug, 2008 - 10:47 AM
Post #5

D.I.C Head
Group Icon

Joined: 28 Dec, 2007
Posts: 71


Dream Kudos: 50
My Contributions
Hm, can you provide mi with an example of such a class and if you are so kind to write a web service example in several rows or a link to a good article will be appreciated. smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 09:22AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month