The machines are never connected to a network. They are tested for logic and accuracy, and are loaded with the information for that election. The machines are security sealed and delivered to polling places. If seals are found to have been broken, the Director of Elections must certify they have not been tampered with prior to use. When machines are powered on, they issue a zero report, then ballot cards are fed into the machine by voters and scanned via optical scanning. The results at the end of the day are printed on paper, the paper ballots are processed separately from the machine results. It’s POSSIBLE, but the level of conspiracy would have to be very, very widespread (every machine physically tampered with), and require someone to physically tamper, in person, making it highly unlikely a Russian national could do so. Also during canvass, the dept randomly selects precincts to conduct a manual tally of. If widespread tampering has occurred, it would be revealed by the manual tally, which could trigger a full recount.
San Francisco does not use touch-screen machines, so there is always a paper copy of a ballot, even if foul play were detected, the votes exist on paper separate from the digital recording of the votes.