security

Fortify Path Manipulation error

百般思念 提交于 2021-01-27 05:44:08
问题 Fority Scan reported "Path Manipulation" security issues in following snippet String filePath = getFilePath(fileLocation, fileName); final File file = new File(filePath); LOGGER.info("Saving report at : " + filePath); BufferedWriter fileWriter = new BufferedWriter(new FileWriter(file)); fileWriter.write(fileContent); so i am checking for blacklisted characters in fileLocation and throwing exception, still the Fortify is throwing the exception. try { String filePath = getFilePath(fileLocation,

How to combine a persistent login cookie with parallel AJAX requests?

﹥>﹥吖頭↗ 提交于 2021-01-27 05:39:10
问题 I've implemented the Improved Persistent Login Cookie Best Practice for a "remember me" option. This works fine when requests are in sequence (traditional page loading). In this case you are sure that the next request will have the same series identifier and the token that was last sent by the server. But in the case of AJAX requests, where multiple requests are coming in parallel from the same browser, the first request will result in the generation of a new token number. But the other

How to combine a persistent login cookie with parallel AJAX requests?

北城以北 提交于 2021-01-27 05:38:05
问题 I've implemented the Improved Persistent Login Cookie Best Practice for a "remember me" option. This works fine when requests are in sequence (traditional page loading). In this case you are sure that the next request will have the same series identifier and the token that was last sent by the server. But in the case of AJAX requests, where multiple requests are coming in parallel from the same browser, the first request will result in the generation of a new token number. But the other

What security holes do I open up if I do not limit the max request length for file upload to my webserver?

ぃ、小莉子 提交于 2021-01-27 05:11:31
问题 I'm working on photo album functionality for my .net MVC 5 site and I recently ran into an issue where by default .net limits file uploads to 4 MB. Not wanting to ever encounter this error again, I am tempted to set it to something large like 1 GB. But this seems like it might be a bad idea. I have 3 questions: What security holes do I open up if I set the file upload max length to 1 GB? Someone recommended that I increase the file upload length only for uploads to a specific directory. Is

AFL warning: Last new path : none yet (odd, check syntax!)

流过昼夜 提交于 2021-01-27 04:17:07
问题 I have this warning (Last new path : none yet (odd, check syntax!)) in red after I try to fuzzing a file. I have no idea why it happens and I googled with no answers. My command is like: afl-fuzz -i testcases/ -o findings/ tcpdump-4.6.2/tcpdump -nr @@ 回答1: It usually means that your command line doesn't actually read the file. Try running it without afl-fuzz, substituting @@ with a path to a file from the testcases directory. Hopefully tcpdump's message will tell you what is wrong. In the

How to limit folder/file access to a program only?

*爱你&永不变心* 提交于 2021-01-27 04:06:53
问题 Okay, so I am creating a c# winforms application. I want to write/read from binary data file. But, I want to put that file in a folder somewhere and I do not want anyone to be able to delete or edit the file. I only want the program that uses the file to be able to access it. Is this possible? I looked into MSDN's structure on file security and as I researched it I saw people complain that if you limit the file to a user then that person can just override the privileges and make it editable.

Securing API key using NDK

China☆狼群 提交于 2021-01-24 11:30:11
问题 I am trying to store api keys using NDK but i tried somany methods always somany error I will share my code please any body help me.. I will share my steps i followed .. 1 Create a folder “jni” under src/main 2 Create and add “Android.mk” file under “jni” folder with following content: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := keys LOCAL_SRC_FILES := keys.c include $(BUILD_SHARED_LIBRARY) Create and add “Application.mk” file under “jni” folder with the following

Securing API key using NDK

对着背影说爱祢 提交于 2021-01-24 11:29:08
问题 I am trying to store api keys using NDK but i tried somany methods always somany error I will share my code please any body help me.. I will share my steps i followed .. 1 Create a folder “jni” under src/main 2 Create and add “Android.mk” file under “jni” folder with following content: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := keys LOCAL_SRC_FILES := keys.c include $(BUILD_SHARED_LIBRARY) Create and add “Application.mk” file under “jni” folder with the following

Securing API key using NDK

[亡魂溺海] 提交于 2021-01-24 11:28:33
问题 I am trying to store api keys using NDK but i tried somany methods always somany error I will share my code please any body help me.. I will share my steps i followed .. 1 Create a folder “jni” under src/main 2 Create and add “Android.mk” file under “jni” folder with following content: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := keys LOCAL_SRC_FILES := keys.c include $(BUILD_SHARED_LIBRARY) Create and add “Application.mk” file under “jni” folder with the following

How can I limit the max numbers of folders that user can create in linux

偶尔善良 提交于 2021-01-24 09:07:22
问题 Since I have been told that if a user in my computer will create "infinite" number of folders / files (even empty) it can cause my computer to become much much slower (even stuck), I want to limit the maximum number of files/directories that user can create. I'm afraid that one user will try to create a huge number of files and it will become a problem for all the other users, so it will be a security issue, How do I do that, how do I limit the max number of files/directories each user can