![]() |
|
[.NET] Making a program only accessible from another program - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Making a program only accessible from another program (/showthread.php?tid=5657555) |
Making a program only accessible from another program - Zhuangzi - Jun 28, 2017 I just finished one of my projects in python, but for the licensing setup I want to use Visual C# to make the login and menus. Is it possible to make it run the python .exe only from the Visual C# login so people can't just run the python .exe without logging in? A good example of this is when you try to run a steam game without doing it through steam and it says you are required to run it through steam. I'm going for something like that * - Aristocles - Jun 28, 2017 Without any security consideration, you shall do the check inside the python program : check for parent process and parent process file md5. * - Zhuangzi - Jun 28, 2017 (Jun 28, 2017 08:46 AM)Martin Heidegger Wrote: Without any security consideration, you shall do the check inside the python program : check for parent process and parent process file md5. I'm not extremely experienced in python. Do you happen to have a link that goes more in depth? * - Ninja - Jun 28, 2017 (Jun 28, 2017 08:58 AM)Zhuangzi Wrote: I'm not extremely experienced in python. Do you happen to have a link that goes more in depth? https://docs.python.org/3/tutorial/ * - zeroexp - Jun 28, 2017 (Jun 28, 2017 08:35 AM)Zhuangzi Wrote: I just finished one of my projects in python, but for the licensing setup I want to use Visual C# to make the login and menus. Is it possible to make it run the python .exe only from the Visual C# login so people can't just run the python .exe without logging in? A good example of this is when you try to run a steam game without doing it through steam and it says you are required to run it through steam. I'm going for something like that What kind of python project did you make? Does it involve requests to a server with information regarding the user you are logged as? Because if that is so, this could be way easier. If all you want is a licensing system and your idea is to not make the app launchable unless opened through the .NET app then it's a very, very bad idea (unless it's a multiplayer game or something similar) * - Zhuangzi - Jun 28, 2017 (Jun 28, 2017 09:23 AM)Wops Wrote: What kind of python project did you make? I made a simple bot, but I just want to be able to give it to a few people and make sure they can't send it to anyone else. If there is a better way to do it then I'm down to learn how * - Ninja - Jun 28, 2017 (Jun 28, 2017 09:29 AM)Zhuangzi Wrote: I made a simple bot, but I just want to be able to give it to a few people and make sure they can't send it to anyone else. If there is a better way to do it then I'm down to learn how Implement something like HWID or IP locks. * - AmericanExpress - Jun 29, 2017 If you're down for mixing native code with your .NET/Python project you could inject code into other running processes and control behavior such as what programs they can run (e.g. control process execution via a hook on ntdll.dll!NtCreateSection), or something else similar. If not then I recommend you follow advice given by other members already. I mean when the user logs on with the client you could change a registry value, drop a file to disk, send a signal to the server and then re-check this from within the Python program but someone could just replicate it manually and then use the Python tool without really logging in so... HWID/IP locking like Ninja suggested is useful too I guess you could always try downloading the Python program from server once user logs in, then having it auto-removed when system reboots via using MoveFileEx (can be used for file removal on reboot: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365240(v=vs.85).aspx ). You could use a mix of techniques into one to make it more time consuming for an attacker... Just remember there are tons of things to try just don't necessarily be so caught up on people breaking everything you implement.. gl ;) |