If such and such were true, then A would not imply B, so A does not imply B. ( On using suppositions to undermine a reasoning). From " I see a tree in front of me" it seems legitimate to infer that " there is actually a tree in front of me". 
But Descartes denies the legitimacy of this inference , saying : 
In case there were a Malin Genie manipulating your mind, the fact that you see a tree in front of you would not imply that there is a tree in front of you. 
So, I think that what Descartes' objection says can be expressed in the following way : 
$$[ M \rightarrow \neg (S \Rightarrow T) ]  \Rightarrow  \neg ( S \Rightarrow T) $$
With : 


*

*M : there is a Malin Genie 

*S : I see a tree in front of me 

*T : there is actually a tree in front of me

*" $\to$ " : material implication

*" $\Rightarrow$ " logical implication ( entailment) 
Does formal logic validate this strategy for undermining a reasoning? 
Is this strategy really fair? Can I really imagine any supposition, any arbitrary scenario to show an inference is not valid? 
Is it corrrect to say that : if , with a new arbitrary premise ( however fanciful it may be) the conclusion does not follow anymore , then the reasoning is actually invalid? 
 A: First, let me quickly comment on your:

Is this strategy really fair? Can I really imagine any supposition, any arbitrary scenario to show an inference is not valid? 

Yes!  This is what you always do when considering the validity of an argument: you consider all possible scenarios that would make the premises true, and that includes scenarios where pigs can fly, where my coat is pink with orange polka dots, etc. So yes, as long as you find some possible scenario, no matter how fanciful, where you find the premises can be true but the conclusion is false, then the argument is invalid.
Indeed, this is exactly what Descartes does. He imagines a scenario where there is some evil Genie that makes you see things that aren't there. This is a fanciful scenario, for sure, but it is logically possible. And, in that scenario, $S$ is true, but where $T$ is false. As such, Descartes concludes: $$\neg (S \Rightarrow T)$$
OK, but can we represent Descartes logical argument? You tried to formalize what Descartes' is saying as:
$$[ M \rightarrow \neg (S \Rightarrow T) ]  \Rightarrow  \neg ( S \Rightarrow T) $$
Or, maybe a bit more intuitively, that Descartes is arguing as follows:
$$M \rightarrow \neg (S \Rightarrow T)$$
$$  \therefore  \neg ( S \Rightarrow T) \tag{*}$$
Now, this certainly does not look like a valid argument: it would seem to require $M$ as an extra premise, and so since we do not have $M$, this does not seem to be valid. But: looks can deceive! 
First of all, note that the argument can still be valid for the simple reason that $$ \neg ( S \Rightarrow T) $$ is already a (meta-)logical truth, and nothing can change that. This is effectively what lemontree does at the end of their Answer. This observation, however, makes no real use of the Malin Genie though, so I am guessing that doesn't feel very satisfying to you.
So, as an alternative 'resolution' that does take into account the Malin Genie, I want to argue that your analysis of Descartes' argument actually isn't quite correct, and that it we make it correct, it will become much more clear that Descartes' argument is perfectly valid.
OK, now, how can we make Descartes' argument work? Again, it would be correct if we had $M$. So, is $M$ maybe a hidden premise, and so the argument really is?
$$M \rightarrow \neg (S \Rightarrow T)$$
$$M$$
$$  \therefore  \neg ( S \Rightarrow T) $$
No, clearly not! We do not know if $M$ is true or false, and so we don't have $M$ as a premise.  
However, what Descartes is assuming (and hence what the argument is still missing), is that $M$ is possibly true. This is, as Andres pointed out, a necessary condition for this to work. Why? Well, suppose $M$ cannot possibly be true. Then clearly $M \rightarrow \neg (S \Rightarrow T)$ would be vacuously true, but it would not force the truth of $\neg (S \Rightarrow T)$. 
Indeed, as a counterexample to the pattern of reasoning presented in $(*)$, we can do:
$$\bot \rightarrow \neg (S \Rightarrow S)$$
$$  \therefore  \neg (S \Rightarrow S) $$
which is clearly invalid, because the premise is vacuously true, but the conclusion is false: if you see a tree, then of course it follows that you do see a tree! (and indeed, as Descartes pointed out later in his Meditations, the existence of our perceptual experiences themselves is something we cannot deny, once we have them)
So, there is a hidden premise: for the argument $(*)$ to work, we do at least need $M$ to be logically possible. OK, so this suggests:
$$M \rightarrow \neg (S \Rightarrow T)$$
$$\Diamond M$$
$$  \therefore  \neg ( S \Rightarrow T) \tag{**}$$
Well, no, that doesn't quite work either. Consider this:
$$\neg I \rightarrow \neg (S \Rightarrow S)$$
$$\Diamond \neg I$$
$$  \therefore  \neg ( S \Rightarrow S) \tag{**}$$
where $I$ represents "I exist"
Now, clearly I exist (and you will have to use 'I' for yourself of course!), so $I$ is true. So, $\neg I \rightarrow \neg (S \Rightarrow S)$ is vacuously true. Premise 2 is true as well: it's logically possible for me to not exist (as soon as I stop thinking and have experiences of any kind). But clearly, the conclusion is once again false.
Fortunately for Descartes, he did not argue in accordance with $(**)$ either. So what really is going on? 
Well, consider that first premise $M \rightarrow \neg (S \Rightarrow T)$. You used this as a premise, because Descartes seemed to be thinking like this: 

"if there is a Malin Genie, then this Genie could make us see trees that aren't there."

However, the thinking really should be like:

"If there would be a Malin Genie, then this Genie could make us see trees that aren't there."

And this now solves the problem we ran into with $(**)$, for now we have:
$$\Diamond M \rightarrow \Diamond (M \land S \land \neg T)$$
$$\Diamond M$$
$$  \therefore  \neg ( S \Rightarrow T) $$
With a simple Modus Ponens on the first two premises, you thus get $\Diamond (M \land S \land \neg T)$. Indeed, as you yourself hint at in the Comments in response to Andres' comment, we don't want $M$ to merely be possible (or consistent), but we want $M$ to be consistent with the truth of $S$ and the falsity of $T$. The core of the argument is thus effectively:
$$\Diamond (M \land S \land \neg T) $$
$$  \therefore  \neg ( S \Rightarrow T) $$
And this argument really is valid: if you can have $M$ and $S$ be true, and $T$ be false, at the same time, then in particular you can have $S$ be true and $T$ be false at the same time, and hence $S$ does not imply $T$. And that reasoning can be represented as:
$$\Diamond (M \land S \land \neg T) $$
$$\therefore \Diamond (S \land \neg T) $$
$$  \therefore  \neg ( S \Rightarrow T) $$
And, as such, we 're back at the very beginning, where Descartes is pointing out the logical possibility of a scenario where $S$ is true, but $T$ is false, in order to argue that $S$ does not logically imply $T$
A: Re. your comment:
Okay, now three different levels are starting to get mixed up. (In the following, assume "formula = object language" and "fact = meta language").
$\newcommand{\fml}[1]{\underbrace{#1}_{\text{formula}}}$
$\newcommand{\fct}[1]{\underbrace{#1}_{\text{fact}}}$


*

*$\neg$ and $\to$ are object-language expressions -- they are applied
to formluas to produce new formulas:
$$\fml{\neg \fml{\phi}}$$
$$\fml{\fml{\phi} \to \fml{\psi}}$$

*$\Rightarrow$ is a
meta-linguistic symbol; it expresses a relation between formulas
(namely that the formulas on the left logically entail the one on the right); it is
applied to formluas to produce a meta-linguistic statement (a fact
about logic):
$$\underbrace{\fml{\phi_1}, \ldots \fml{\phi_n} \Rightarrow \fml{\psi}}_{\text{fact}}$$

*Lastly, there are English (meta-language) "not ..." and
"if ... then ...", which are applied to meta-linguistic statements
(facts about logic) to produce new statements:
$$\fct{\text{It is not the case that} \fct{A}}$$
$$\fct{\text{If} \fct{A} \text{then} \fct{B}}$$
$[(→¬(⇒))∧]⇒¬(⇒)$ doesn't make sense, syntactically: $\neg$ can only be applied to formulas, but $S \Rightarrow T$ is not a formula. 
$$\underbrace{\neg (\fct{\fml{S} \Rightarrow \fml{T}})}_{\text{$\neg$ fact = syntactical nonsense}}$$
So $\neg(S \Rightarrow T)$ isn't a meaningful expression of any language level (object or meta) in the first place, so we can't make any judgement about it. If you want to negate the truth of the meta-linguistic fact, "$S$ does not logically imply $T$", then you have to use a meta-linguistic "not" to do so, i.e. say "It is not the case that $S \Rightarrow T$"
$$\fct{\text{It is not the case that} \fct{S \Rightarrow T}}$$
which can be abbreviated $S \not \Rightarrow T$
$$\fct{S \not \Rightarrow T}$$
Likewise, you can't put a $\Rightarrow$ in between two facts because $\Rightarrow$ expects formulas to its left and right:
$$\underbrace{\fct{\text{If $M$ is true then} S \not \Rightarrow T} \Rightarrow \fct{S \not \Rightarrow T}}_{\text{fact $\Rightarrow$ fact = syntactical nonsense}}$$
If you want to say "If S does not imply logically T in case M is true, then S does not imply T logically", then you have to say just that:
$$\fct{\text{If} \fct{\fct{S \not \Rightarrow T} \text{ if} \fct{M \text{ is true}}} \text{ then } \fct{S \not \Rightarrow T}}$$
You can not translate "If ... then ..." as $\Rightarrow$ as "not" as $\neg$. These are not the same, and writing $[(→¬(⇒))∧]⇒¬(⇒)$ doesn't make sense -- hence why I assumed you meant $[(→¬(→))∧]⇒¬(→)$.
We can use truth tables to check meta-linguistic properties of and relations between formulas such as $\Rightarrow$, $\Leftrightarrow$ etc, which is what I did. We can not use truth tables to check facts about these properties, such as "If this logical implication doesn't hold, then that logical implication doesn't hold", which is what you meant. For this we have to write proofs in English.  
Let's consider again what you wrote,

If $S \not \Rightarrow T$ if $M$ is true, then $S \not \Rightarrow T$.

This is still not completely sensical: $S \Rightarrow T$ means "For all interpretations (which in the case of statement logic are valuation functions aka assignment functions), if $S$ is true under that interpretation, then so is $T$". This is a fact that's either true or false -- either we do have truth preservation under all interpretations (in which case $\Rightarrow$ holds) or we don't (in which case $\Rightarrow$ holds), it's not something that's sometimes true if something and sometimes false if something else. When we write $\Rightarrow$, then we're at a state where we have already checked all the possible interpretations, and it makes no sense to restrict that judgement to only particular situations. What you mean is that "if $M$ is true, this is a situation where $S$ is true but $T$ is not", hence there is an interpretation under which $S$ is true but $T$ is not, hence not in all interpretations under  which $S$ is true $T$ is true as well, hence $S \not \Rightarrow T$. So we have $S \not \Rightarrow T$ (the entailment is invalid) because there is that situation where $M$ is true, not if M is true.
So your statement is actually

If $S \not \Rightarrow T$ since $M$ is true, then $S \not \Rightarrow T$.

The proof now is quite simple: If we already know that $S \Rightarrow T$ does not hold, namely because there are those situations in which $M$ is true which is a counterexample to the validity of the implication, then we already have established $S \not \Rightarrow T$, so yes, that is a valid (but trivial) argument.
It all boils down to saying "The logical implication $S \Rightarrow T$ doesn't hold, because for that it would need to be the case that all interpretations in which $S$ is true make $T$ true as well, but there is an interpretation where this is not the case, namely when $M$ is true". However, you'd need to argue why $M$ is actually a situation in which $S$ is true but $M$ is not. This is at a level where we can no longer decompose the statements by mean of statement logic but have to argue about world knowledge -- that is, whether or not you accept this argument depends on whether or not you accept that you seeing a tree despite none being there because of some evil genie occupying your mind is indeed among the conceivable situation.

Old version, assuming OP meant $M \to \neg(S \to T) \Rightarrow \neg(S \to T)$ (with a material implicaiton between $S$ and $T$), because the original statement makes no sense syntactically:  
No, this inference is not valid. Just because $S \to T$ is false if $M$ is the case doesn't mean we can't conclude that $S \to T$ is indeed false -- because it might be that $M$ is not true after all.
It suffices to take a look at the truth table:
M S T | M > ~ ( S > T )  | =>? | ~ ( S > T )  
--------------------------------------------
T T T |   F F     T              F
T T F |   T T     F        ✓     T
T F T |   F F     T              F
T F F |   F F     T              F
F T T |   T F     T        X     F
F T F |   T T     F        ✓     T
F F T |   T F     T        X     F
F F F |   T F     T        X     F
            ^                    ^

An inference is valid iff in all the rows where all of the premises are true, the conclusion is true as well. (Rows in which not all of the premises are true are irrelevant.)
As you can see, there is at least one interpretation under which $M \to \neg(S \to T)$ is true, but $\neg(S \to T)$ is false: namely when 1) there is no genie and I see a tree and it's actually there, and 2) and there no genie and I don't see the tree but it's there, and 3) there is no genie, I see no tree and there is none.
Hence, the inference $M \to \neg(S \to T) \Rightarrow \neg(S \to T)$ is invalid. 
