YouAssuming the data has not been doctored in order to specifically spoof it's origin you could to a degree determine the camera/lens, depending on how much data you has available.
Cameras
If you had all the RAW data (in a format such as DNG) you could narrow it down quickly based on
- exact number of pixels
- how many pixels are masked at the edge of the frame
If you had a crop of the RAW data you could still look at
- bit depth (though some cameras let you choose)
- black point clipping (some manufacturers apply this to the RAW data)
- gaps in the histogram (Sony use a slightly nonlinear encoding that starts of counting 1,2,3 etc. then jumps to a coarser scale 104, 108, 112 etc), Canon's intermediate ISOs are implemented using digital arithmetic hence certain values will be absent.
- dynamic range / banding patterns (some sensors exhibit noticeable patterns in the shadows)
- Frequencies missing due to RAW "cooking" (e.g. noise reduction) I think Sony used to do this. This and other oddities can be revealed by looking at the Fourier transform.
- the properties of the CFA used (provided you had an image of a well known object / colour chart)
with this approach you're likelikly to be able to narrow it down to a particular sensor manufacturer (the camera itself leaves very little in the way of a fingerprint, so it would be hard to distinguish between a Sony sensor in a Pentax body and a Sony sensor in a Nikon body). As Canon make their own sensors you could identify a Canon based on characteristic banding patterns, or the number of masked pixels, but Canon use the same or very similar sensors in many different camera bodies.
With just a processed or resized image it would be much much harder. You could still attempt to measure the dynamic range (provided there was evidence of clipped highlights) though this could become unreliable due to the processing.
Lenses
Lenses canUnlike sensors there are few dead giveaways (such as pixel count), however the lens used could be characterisednarrowed down by looking at by a combination of
- field of view (though this could be masked by cropping)
- out of focus highlights (number of aperture blades, Canon 50 f/1.8 is easy to spot with 5)
- , spherical aberration (certain lenses are strongly over or undercorrected for SA which may be determined by looking for dark or light edges to oof highlights), catadioptric lenses are easy to spot due to donut bokeh.
- other quirks (swirly bokeh, astigmatism, coma)
- distinctive lens flare (see the 50mm f/1.8 images in this question)
- extreme parameters that are rare (ultra wide field of view / maximum aperture)
By combining information about the lens and sensor you can narrow things down further as some lenses can only be mounted on some bodies (without extensive modification).
Finally even with a resized, processed image you can sometimes identify a camera/lens based on attributes commonunique to the format. I was watching the independent film "Rubber" and within seconds I could tell it was shot with a Canon 5DmkII based on the depth of field at wide angle, due to the fact the sensor is larger than almost all available cine cameras (both film and digital) apart from 65mm70mm monsters which would have been far outside the budget of this production.