R' Ephrayim Oshry answered in MiMaamakim (4:10) regarding someone's question if he can join the partisans.
It looks like the Teshuva was written around the time that the extermination camps were just beginning and their existence was still just a rumor. Following this rumor, many ran away at night to join the partisans, saying that this is the only way they'll stay alive.
However, joining the partisans was no picnic either. Running away from the Ghetto was dangerous, and the partisans weren't interested in people without guns. Moreover, plenty of the partisans were anti-Semitic themselves and would kill any Jew they could.
He says that there are two ways to look at it. One is that living in the Ghetto is a death-sentence and running away could save one's life, or maybe the Ghetto is "safe" (there was no concrete proof that all Jews were going to be killed, and many believed that if they just behave they'll stay alive) and running away is putting oneself in a safek sakana.
To answer this question he quotes the Gemara in Eiruvin which says that when non-Jews come to attack a border city on Shabbos (even if they're only coming for money), we're allowed to fight back since "lest land will be open in front of them". Any battle is a "doubtful danger", yet one can put oneself in doubtful danger to save the rest of the Jews from a definite danger. From here he derives that it's even more required for a Jew to put himself in a doubtful danger to save himself from a definite danger.
Therefore, as it appeared that there was more danger in staying than running away, one should run away to the forest.
Moreover, says R' Oshry
מעתה לפי דברי המנחת חינוך הרי ברור, שהמלחמה הזאת שהגרמנים
הארורים צאצאי עמלק ימ״ש הכריזו על היהודים לאבדם ולהשמידם,
בודאי שהחיוב והמצור, מוטלים על היהודים להשיב מלחמה שערה ולהשיב
להם כגמולם ולעשות להם כאשר הם זוממים עלינו ומצוה לרדוף אותם באף
ולהשמידם מתחת שמי ה׳
Now, based on the Minchas Chinuch it's clear, that [in] this war which the cursed Germans, descendants of Amalek, declared on the Jews to plunder and destroy is definitely an obligation on the Jews to return to their gates and to answer them the way they planned to do to us and it's a mitzva to chase after them and destroy them from under the heavens of Hashem.