We investigate the relationship between doctoral students' attitudes towards scientific misconduct and their self-reported behavior. 203 questionnaires were distributed to doctoral candidates at the Faculty of Medicine, University of Oslo 2016/2017. The response rate was 74%. The results show a correlation between attitudes towards misconduct and self-reported problematic behaviors among doctoral students in biomedicine. The four most common reported misbehaviors are adding author(s) who did not qualify for authorship (17.9%), collecting more data after seeing that the results were almost statistically significant (11.8%), turning a blind eye to colleagues' use of flawed data or questionable interpretation of data (11.2%), and reporting an unexpected finding as having been hypothesized from the start (10.5%). We find correlations between scientific misbehavior and the location of undergraduate studies and whether the respondents have had science ethics lectures previously. The study provides evidence for the concurrent validity of the two instruments used to measure attitudes and behavior, i.e. the Kalichman scale and the Research Misbehavior Severity Score (RMSS). Although the direction of causality between attitudes and misbehavior cannot be determined in this study the correlation between the two indicates that it can be important to engender the right attitudes in early career researchers.