It is unlikely that Paul wrote Ephesians and 2 Thessalonians, but it possible.
Paul definitely did not write 1 Timothy, 2 Timothy, and Titus. They were written much later by someone claiming to be Paul. Although today we view that as unethical, it was common practice at the time and was not even controversial. If you were a disciple of a person and thought that you were expressing the person's ideas, it was acceptable to use their name