Questions tagged [code-security]

40 questions
15
votes
4 answers

How to perform obfuscation of source code and protect source in electron js

I recently developed an app with electron framework and am now worried about source code protection after reading security concerns related to electron javascript code. I mean reverse engineering of the code is possible even if the app is built for…
Kiran Maniya
  • 8,453
  • 9
  • 58
  • 81
13
votes
3 answers

Avoiding user code calling to Reflection in C#

I'm implementing an automatic "evaluator" for a course I'm currently teaching. The overall idea is that every student delivers a DLL with some algorithms implemented. My evaluator loads all these DLLs using Reflection, finds the student…
Alejandro Piad
  • 1,827
  • 1
  • 16
  • 23
6
votes
2 answers

Is it impossible to secure .net code (intellectual property)?

I used to work in JavaScript a lot and one thing that really bothered my employers was that the source code was too easy to steal. Even with obfuscation, nothing really helped, because we all knew that any competent developer would be able to read…
JL.
  • 78,954
  • 126
  • 311
  • 459
5
votes
2 answers

c# dll encryption

I need to encrypt my C# code used by by ASP.NET pages. So, when I compile to create an DLL file I do need to encrypt my DLL file. Please do help me how to encrypt DLL file...
Karthik Malla
  • 5,570
  • 12
  • 46
  • 89
5
votes
2 answers

Creating custom CodeAccessSecurityAttribute leads to exception on compile

I'm building a custom CodeAccessSecurityAttribute to handle authorization for my WCF services. I built class A as such: public class A : CodeAccessSecurityAttribute { public A() : base(SecurityAction.Demand) { // Constructor Code …
thaBadDawg
  • 5,160
  • 6
  • 35
  • 44
5
votes
2 answers

Limiting code in method to only call members in same class

Is there a way that I can limit the the calls made in one method in my class so only methods and properties on the enclosing class (also inherited) can be called. I'm using c# (.NET 4.5). This would be used as a code security feature in our…
Richard Houltz
  • 1,962
  • 1
  • 18
  • 24
4
votes
1 answer

Using of System.Security.Permissions.DataProtectionPermissionAttribute

Have you ever used this class in real world application? Can you imagine scenarios where it can be useful? I'm asking because in WCF there is MessageBodyMemberAttribute to control data integrity/encryption and wonder if they're somehow related.
UserControl
  • 14,766
  • 20
  • 100
  • 187
3
votes
2 answers

clang not stuck at #include "/dev/whatever"

I'm working on a project of code safety of online judger. One possible vulnerability is when someone uploads a piece of code like this: #include "/dev/stdin" #include "/proc/self/fd/0" #include // Other legitimate code I'm trying to…
iBug
  • 35,554
  • 7
  • 89
  • 134
2
votes
1 answer

MethodAccessException

I have an unmanaged assebmly (encryption functionality) that a VB.NET (2.0) installer class uses for some installation diagnostics on the application server during the application installation.The problem is that whenever a method is called it…
2
votes
0 answers

APPSACAN: Authentication.Credentials.Unprotected

I did a scan with the APPSCAN to an application, and the report says there's a vulnerability called:"Authentication. Credentials. Unprotected" and it's in that method: public string CrearSeguimientoCertificador(string UsuarioServicio, string…
2
votes
1 answer

Is it possible to hide sources under HHVM?

Under pure PHP we can use something like ioncube/else with obfuscation. Under pre-HHVM we can use already compiled code without sources. But under current HHVM can we somehow hide our sources?
gaRex
  • 4,144
  • 25
  • 37
2
votes
2 answers

Is it possible to prevent a DLL from being modified?

Is it possible to sign or otherwise protect a managed (.NET) DLL from being modified? I'm looking for possible solutions that would detect changes to DLLs and prevent them from being loaded by the .NET runtime. I don't mind if someone can load the…
xxbbcc
  • 16,930
  • 5
  • 50
  • 83
1
vote
1 answer

Is it possible to hide constant variable from browser dev tools in react js without using .env

Is it possible to hide constant variables in react js ... I have used .env file but after the 'npm run build' constants mentioned in .env visible in dev tools->source section Is any other method or way is there to hide constant from dev tools? I…
1
vote
1 answer

protecting stack memory of program

Lets assume that i wrote program in .c and that end user is starting .exe file. During program's execution there is variable called CHECK that gets dynamically assigned in middle of program's execution using some pseudo random algorithms. In one…
TrueStar
  • 79
  • 6
1
vote
1 answer

Save SQL Server Login savely in code (C#)

I'm a fairly new developer and am currently working on a C# program that connects to a MYSQL Server with the following Code: class MySql { private MySqlConnection connection; private string server; private string database; …
Timothy Lukas H.
  • 684
  • 2
  • 9
  • 19
1
2 3