This can be stated in active form. Alternate translation: "This is how we know who the children of God are and who the children of the devil are" (See: [[rc://en/ta/man/translate/figs-activepassive]])
The words "from God" are understood in the second part of the sentence. This can also be stated in positive form. Alternate translation: "whoever does not do what is righteous is not from God; whoever does not love his brother is also not from God" or "those who are from God do what is right, and those who are from God love their brothers" (See: [[rc://en/ta/man/translate/figs-doublenegatives]] and [[rc://en/ta/man/translate/figs-ellipsis]])