"By no means" is an idiom. In that regard, its use is flexible and often regionally defined. To my ear, the sentence sounds better when organized like this:
By no means can our method be considered an attack.
However, if asked to choose between the two sentences you provided, I would prefer the first.
Our method can by no means be considered as an attack.
But it feels awkward. Part of it is the use of "as," which is grammatically legitimate but verbose in this situation. The rest of it is that "by no means" is inserted into the middle of the idea being presented, breaking the "train of thought." This is why my initial example is my preference. By pushing "by no means" to the front of the sentence, the emphasis it causes is established without interrupting the more important issue of the method not being an attack.