web server: is a web application firewall sufficient to defend against SQL injection? Or should I use prepared statements?

No, a WAF is probably not enough. Filters incoming network traffic and can block things that and appears SQL injection, but all this happens before traffic reaches your application. Data / input manipulation performed by your own code may allow / introduce vulnerabilities.

In addition, if your application accepts data from sources other than incoming network traffic or operates with them, the WAF is irrelevant.

You should ensure that you use the appropriate security precautions (for example, statements prepared for SQL) within each component of your system, instead of relying solely on some other component (which may or may not always be there, and may or may not function as expected)) to provide mitigation.

sql injection: what is the risk of an attacker inserting new password hashes?

The normal threat model I see with password hashing is like a kind of defense against whether the hash leaks in any way to the world in general. In practice, this seems to be through some type of database violation that ends with (at least) the user table that is discarded. Since this has happened or may happenWhat are the chances that the attacker can also put new values ​​in the database?

In particular, I am thinking of the attacker who generates a new hash for a known password, or takes the attacker's own hash password and replaces it in another user's record.

Basically, is it a realistic threat against which you have to protect yourself or do only my thoughts become a security paranoia?

Injection – How to inject XSS to Angular 1.5.11?

I found the html injection on a website whose frame is angular 1.5.11 (vulnerable version by expression). And there I can't find the expression, that's why I can't explode angular. but I found the html injection that answers 400 incorrect requests. and I executed some tags (img, a and others). It cannot be executed (iframe, script and onload, onerror events don't work either) because they disinfect them angularly.

Injection of dependencies or manual creation of structures in others with go

I come from PHP OOP, so I just want to know if what I do with Go is a common / acceptable practice or not (I'm rookie in Go) It has to do with dependency injection.

In OOP it is better to inject object X into object Y instead of directly instantiating object X into object Y. I will not list the reasons because I believe that most of you know the general practices of OOP, etc. Since Go is not an OOP language and I have seen that both versions are used, which of the following versions beats another and why?

object x

``````package x

type Config struct
{
Name string
}

func NewConfig() Config {
return Config{"whatever"}
}

// ...
``````

SEE 1

object and

``````package y

func DoSomething() {
c := a.NewConfig()
// ...
}
``````

SEE 2

object and

``````package y

func DoSomething(c a.Config) {
// ...
}
``````

How does this NoSQL injection work?

Could someone explain what this is doing and how it works? I already know about SQL injection, but the NoSQL is confusing.

This is a slide from my teacher, but it provides very little context.

Functions – Injection auto-map – verify my test

Leave $$f: (N) a (N)$$ be an injective auto-map where $$(N): = {1, 2, …, N }$$ It is a finite set of $$mathbb {N}$$. Show that $$f$$ It is bijective.

My test:

As $$f$$ It is injective and finite, we simply count all the images of $$N$$ which are $$N$$-Many. As $$f ((N)) subseteq (N)$$, We conclude $$f ((N)) = (N)$$ since both sets have the same cardinality. So $$f$$ It is surjective and therefore bijective. $$q.e.d.$$

Is this correct?

Our teacher's approach is different and I don't understand a step he took:

He took the union of all the pre-images $$bigcup_ {k = 1} ^ N {f ^ {-1} (k) }$$, which are also $$N$$-Many and use injectivity to argue that everyone $${f ^ {-1} (k) }$$ they are separate pairs and therefore $$bigcup_ {k = 1} ^ N {f ^ {-1} (k) } = (N)$$.

Because it has $$bigcup_ {k = 1} ^ N {f ^ {-1} (k) } = (N)$$?

$$bigcup_ {k = 1} ^ N {f ^ {-1} (k) } subseteq (N)$$ it's true, but I don't understand the other subset property $$supseteq$$ Which finally shows that both sets are euqal?

Can anyone explain this step to me?

dependency injection – IoC / DI + constructor arguments "normal" mvvm

I am using the unit in C # to achieve dependency injection and control investment.

What if I have a class, say a view model, which depends on several services such as a repository, a validator and a record BUT it also depends on a simple list of data
objects, so I would have a constructor like this

``````ClientVM(DBService db, ClientValidator v, Log log, List clients)
``````

The way I solved this at the moment is with a class that handles the creation of ClientVM, I call it a factory, however, after searching on Google I am no longer sure if it is the correct term.

``````public ClientFactory(DBService db, ClientValidator v, Log log) { ... }

public Client Create(List clients) {
return new ClientVM(db, v, log, clients);
}
``````

Then I can inject ClientFactory anywhere where I need to create new ClientVM.

This still feels something clean to me. But what happens if I expand it and say that I have a detailed view model in my ClientVM, their addresses, for example.

So my ClientVM now depends on an additional AdressVM, which would mean that I write a similar AdressFactory, inject it into the ClientFactory and then in my create () method I call the

It is starting to get complicated. Perhaps.

I wonder if this is a sign of bad design. How would it make it simpler? Can I avoid all these "factories"? Is that how it is, since I am quite close to the root of the composition and the logic of creation is still somewhat complex?

web application – Exploiting SQL injection vulnerabilities in Oxid eShop CE 6.0.2 with SQLMAP

I installed Oxid eShop CE 6.0.2 on my local web server to analyze the latest SQL injection vulnerability in this web application.
I discovered that it is possible to inject sql code through the classification parameter (GET). Then with the following url, I'm capable of run sql code (as you can see):

• localhost / oxid / test / source / en / Wakeboarding / Wakeboards / Wakeboard-SHANE.html? sorting = oxtitle | ASC, (SELECT% 20sleep (20))

How can I exploit this vulnerability with SQLMAP?

dependency injection: why does Laravel support the use of facades while Symphony endorse DI?

I have a small experience working in Symfony and Laravel. At Symphony, I noticed that the use of dependency injection patterns is highly supported due to the nature of the framework.

On the other hand, Laravel, which uses Symfony components, supports the use of the Facade pattern, although dependency injection is also supported.

So, noticing this difference, I have these questions:

1. Why in Laravel is it more common to use facades instead of ID?
2. In the common components of Laravel (e.g. `DB` class) What benefit is obtained by using Facade instead of DI?
3. On the side of Symfony, what benefit do I get with the intensive use of dependency injection?

Dependency injection: why laravel erda the use of facades while Symphony Erdoses DI?

I have a small experience working in Symfony and Laravel. In Symphony, I realize that the use of dependency injection patterns is very wrong in the nature of the frames.

On the other hand, the Laravel that uses the Symfony Components errata the use of the Facade pattern, although the Injection of dependencies is also compatible.

So, noticing this difference, I have these burning questions:

1. Why in Laravel it is more common to use facades instead of ID.
2. In the common components of Laravel (Im means the `DB` class) what benefit is obtained using Facade instead of DI.
3. On the side of Symfony, what benefit do I get with the intensive use of dependency injection;