security

Docker Host Security - Can container run dangerous code or change host from inside of a container?

北慕城南 提交于 2021-02-07 12:12:21
问题 Lets say I pull a new image from a hub repository and run it without looking at the contents of the dockerfile. Can the container or image affect my host in any way possible? Please let me know because I will be running a list of images from a user inputted image names on my server. I am worried if it will affect the server/host. 回答1: With a default execution of an image, the answer is a conditional no. The kernel capabilities are limited, the filesystem is restricted, the process space is

Docker Host Security - Can container run dangerous code or change host from inside of a container?

你离开我真会死。 提交于 2021-02-07 12:10:57
问题 Lets say I pull a new image from a hub repository and run it without looking at the contents of the dockerfile. Can the container or image affect my host in any way possible? Please let me know because I will be running a list of images from a user inputted image names on my server. I am worried if it will affect the server/host. 回答1: With a default execution of an image, the answer is a conditional no. The kernel capabilities are limited, the filesystem is restricted, the process space is

Authorization Asp.net web.config

…衆ロ難τιáo~ 提交于 2021-02-07 11:52:08
问题 I have an application that has a backoffice. This backoffice was isolated with the use of roles like this: <location path="backoffice"> <system.web> <authorization> <allow roles="admin"/> <deny users="*"/> </authorization> </system.web> </location> But now we have another type of role that needs access. The companyadmin role. Can I just say?: <location path="backoffice"> <system.web> <authorization> <allow roles="admin,companyadmin"/> <deny users="*"/> </authorization> </system.web> <

Is it safe to call Type.GetType with an untrusted type name?

六月ゝ 毕业季﹏ 提交于 2021-02-07 11:16:43
问题 I came across the following in a code review: Type type = Type.GetType(typeName); if (type == typeof(SomeKnownType)) DoSomething(...); // does not use type or typeName typeName originates from an AJAX request and is not validated. Does this pose any potential security issues? For example, is it possible for unexpected code to be executed, or for the entire application to crash (denial of service), as the result of loading arbitrary types from arbitrary assemblies? (I suppose some joker could

Is it safe to call Type.GetType with an untrusted type name?

元气小坏坏 提交于 2021-02-07 11:16:09
问题 I came across the following in a code review: Type type = Type.GetType(typeName); if (type == typeof(SomeKnownType)) DoSomething(...); // does not use type or typeName typeName originates from an AJAX request and is not validated. Does this pose any potential security issues? For example, is it possible for unexpected code to be executed, or for the entire application to crash (denial of service), as the result of loading arbitrary types from arbitrary assemblies? (I suppose some joker could

JAVA API to create a keystore and attaching a csr and keypair to it

房东的猫 提交于 2021-02-07 10:51:44
问题 I need to attach an existing csr and keypair to a keystore. Given below is an implementation that uses GUI(java swing) to take the input from the user such as keystore name, alias,common name, organization etc. I try to link the csr to the keystore using keystore.setkeyentry(...), however the keystore is still empty. I have attached my code below, any help will be very useful: This code below is used to create a csr public String getCSR(String cn, String ou, String o, String l,String s)

Create and user loadUserByEmail instead of loadUserByUsername

一笑奈何 提交于 2021-02-07 09:27:53
问题 I m looking a way to create and use my own method to load user in Java Spring Security. I would like to retrieve my user not by UserName but by email. public class UserDetailsService implements org.springframework.security.core.userdetails.UserDetailsService { @Autowired UserRepository userRepository; private static final Logger logger = LoggerFactory.getLogger(UserDetailsService.class); public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException { Optional<User>

Create a Low/Medium process from a elevated process with CreateRestrictedToken(LUA_TOKEN)

早过忘川 提交于 2021-02-07 09:20:24
问题 I'm trying to create a Medium or Low integrity process from a elevated process. I know there are other questions like this but they mostly focus on the workarounds like using Explorer or the Task Scheduler and I want to stick with CreateRestrictedToken() + CreateProcessAsUser() . I assume it must be possible to do this somehow since I believe UAC does it when you log in but I have not been able to get everything in the token to look like the normal UAC Medium IL token. You can get 80% there

Create a Low/Medium process from a elevated process with CreateRestrictedToken(LUA_TOKEN)

余生颓废 提交于 2021-02-07 09:20:08
问题 I'm trying to create a Medium or Low integrity process from a elevated process. I know there are other questions like this but they mostly focus on the workarounds like using Explorer or the Task Scheduler and I want to stick with CreateRestrictedToken() + CreateProcessAsUser() . I assume it must be possible to do this somehow since I believe UAC does it when you log in but I have not been able to get everything in the token to look like the normal UAC Medium IL token. You can get 80% there

Where should I store the Public Key?

与世无争的帅哥 提交于 2021-02-07 09:12:10
问题 My web application have a continuously running service to send a report to a ftp server, the file need to be encrypted by using a Public Key. Thus my question is where should I store the Public Key? I only have one Public Key so using an advanced Key Store seems to be overkill? Should I just manually create a folder on the server and store it in there? 回答1: Storage of the public key (or more likely a certificate containing it) isn't the part that matters. What matters is the location of the