Or would any alien megastructures humanity discovers have had to enter our solar system from interstellar space? Basically, what is the likelihood that an alien megastructure like a space station, spaceship, or some remnant of planetary engineering (a space elevator or a moon-sized supercomputer perhaps) could have remained undetected by astronomers up to the present day? It has to be many kilometers in size, at least as big as an asteroid.
The size limit for such an alien artefact depends mostly on where you want it to reside in the solar system and how much it is concealed.
The main methods by which we detect asteroids and moons is reflected light (not restricted to visible wavelengths). If the object is near earth and a few kilometers is size it is likely it would be discovered (by hobby astronomers, or by coincidence observation). But if its surface properies were within the range expected from asteorids, nobody would suspect its alien origin.
Larger installations could very well exist inside large asteroids or under the surface of the many moons. For the sake of plausibility, I'd keep the size of such an artefact well below 400km - thats about the size were hydrodynamic forces would be strong enough to pull it into spherical shape.
Some activity (read: excess heat emission) could be inconspiculous enough to be not recognized as artificial. For example if a subsurface installation on a jovian moon produced a few gigawatts of excess heat, raising the surface temperature by less than a kelvin, we would most likely not notice it as artificial. Instead scientists would assume tidal friction at work, or a bit higher than average amount of radioactive elements in its core.
The farther out you place the object, the less likely it is we would even detect it. Most sky surveys looking for minor planets focus at the plane of the ecliptic; objects with high inclination are less likely to be found; unless they are very large (big KBO-sized).
Considering there are still a lot of fairly large bodies we don't even have images that allow to discern large surface features there is a lot of room to hide alien bases. If it were a sub-surface base, it may well be undetected until (if its large enough) a probes orbit deviation detects it as a gravity anomaly. Even then, we would not suspect it as alien immediately. A set of subsurface tunnels could remain undetected for a really long time. Even unknown cave systems on earth are still found in this day an age (and fairly large ones, too; sometimes by geological survey, sometimes by accidentially digging into them when mining).
An inactive artefact that is covered with asteroid rubble could possibly be overlooked even when humanity already is expanding into the solar system. If the density is not too peculiar and its orbit inconvenient for exploration, nobody would take a second look.
So all in all, there is a lot of room where you can hide your alien station/base. Just make it not too large and too active and it could very well remain plausible for many decades or more into the future. If, on the other hand you want it to be found, you probably want to take above into account to give it a property that allows it to be found (e.g. excess heat emission, unusual surface features etc).
It might help to read a bit into minor planet detection and the intricacies of their size estimation to get a better grip on how much telescopes can do and what they can't do.
How big do you want it to be?
Until the Dawn probe came close enough, this was our best picture of Ceres, the largest object in the asteroid belt:
1 Ceres is 965 km across, much larger than either Death Star.
This is 2 Pallas, the third most massive body in the asteroid belt:
Pallas is around 550 km across, again much larger than either Death Star.
If a Death Star was in the asteroid belt, we could theoretically have missed it.
Further out, you have even more room to play.
This is the best picture the Hubble space telescope could capture of Pluto:
Prior to the images provided by the New Horizon's mission, we knew next to nothing about what Pluto looked like.
We're only beginning to explore our solar system. We've hit the big targets, but the small ones are still fuzzy blurs in our telescopes. To be sure, it's very unlikely that any of them could hold active technology - the infrared signature of the waste heat would be easy to spot - but cold, silent, inactive technology is certainly not impossible.
There is believed to be a ninth planet in the solar system, a bit smaller than Uranus or Neptune, that has thus far evaded detection (except as the result of a chain of inferences based on the orbits of trans-Neptunian objects). If there's room for an undetected planet ten times the mass of the Earth, there's room for as big a space station as you want, provided you put it sufficiently far from the sun.
More information about the search for Planet Nine: https://en.wikipedia.org/wiki/Planet_Nine Many indicators of the planet were found during the year 2016.
There are many possibilities, here are some:
Perfect deception: A whole moon is, in fact, an alien structure, covered by rocks and dust to conceal it's true nature.
Aerostatic Station: A huge station, hidden into the atmosphere of a gas giant, well beneath the cloud layer (assuming that it's shielded or a remnant it emits no energy so it's really hard to detect)
Solar Base: Aliens are so technologically advanced that they can build bases on the sun (thus masking any emission)
Deep space base: A base so far from the sun that it's almost impossible to find (unless you know it's exact position) - See Sedna
Underground Base: on Venus. We don't even think that something or someone can build a base on a so hot planet (and with such atmosphere pressure).
Asteroid Base: an asteroid base, built inside the rings of one of the solar system planets. That would be really hard to spot.
I could go on and on, but the truth is that we know little of our solar system. We explored even less, and finding even a 10km cube would be really hard, in the right conditions.
This question has attracted many good answers. There are two "places" where alien megastructures could be located and be hard to detect.
Firstly, if they were located out of the plane of ecliptic. Most searches for objects in the solar system take place by looking in directions confined to the plane of the ecliptic. An alien megastructure could be in orbit around the solar system and there be very small windows of opportunity to detect it as its orbit carried it close to the plane of the ecliptic.
Secondly, any megastructure might be located a long way from the centre of the solar system. In this case, their angular resolution will be miniscule and therefore hard to detect. Objects out as far as the orbits of Uranus and Neptune could be difficult to spot. Remember Clyde Tombaugh had an extremely difficult task in finding Pluto and he knew he was looking for something, in this case, a ninth planet. Astronomers might easily overlook something a few pixels wide if it was something they weren't looking for.
Of course, structures pumping gigawatts of energy could be readily spotted. However, any technological civilization capable of interstellar travel may be able to avoid dumping large amounts of waste energy into its surroundings. Thus adding to its difficulty in being detected.
An energy-using thing, be it large or small is a much easier thing to detect than a turned-off or otherwise totally passive device -- and competent searchers would take advantage of this.
Thermodynamics still apply, so a powered device (unless it's perfectly efficient) must eventually reject waste heat into its environment. Perfectly directional heat rejection is hard to do, if for no other reason than diffraction limits (e.g. for a highly efficient IR 'flashlight' always pointed away from all observers, as a tactic for covert heat rejection.) This is why militaries have thermal cameras and heat-seeking missiles.
Power use is easier to hide/mask near substantial existing power sources, especially concentrated and/or varying ones. I suspect that the varying volcanic activity on some of Jupiter's moons could usefully mask the energy use of a considerable base or small city.
Generally, we'd have to search for some feature or signal that is unlikely to come from natural processes. Lots of straight lines, or flat surfaces other than planetary/asteroid 'ground level' are things I'd look for.
Stretching the definition of a megastructure a bit, a truly advanced alien race could hide by creating a "basement universe" and only using a narrow wormhole to enter and exit this universe.
Since the effects of a "basement universe" might still be felt through gravitational interaction or leakage of heat energy from the wormhole, the construct would need to be a considerable distance from the Sun, possibly orbiting in the Oort cloud or at a considerable angle to the plane of the ecliptic.
The Oort cloud
Of course, this would lead to some interesting questions about the motivations of the aliens in the first place. If they have the ability to create their own universe(s), why are they anywhere near the Solar System, unless they had tapped the energy of the Sun at some point in the very distant past to create this artifact. If they can create their own universe, why would they not adjust the various physical constants to make it even better than this universe for life, and if it is better, then why wold they want a connection to this universe, unless it is actually a sort of vent to dump entropy from their universe to our own....